|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
pkg_add g95;g95 x.f95: cannot find g95
Hi all,
I have recently installed OpenBSD. After installing I used pkg_add -v g95 and was able to use g95 to compile my code. I have since added cvsup and downloaded the src code and rebuilt the kernel and world (Following openbsd101 guide). I encountered no errors in the upgrade process, however I am no longer able to use g95. I have run pkg_delete g95;pkg_add -v g95 and it seems to install correctly but I cannnot run it. It is not installed in /usr/bin/g95 where I expected it to be. Does anyone have any ideas as to what is going on? uname -a: OpenBSD te2100.nj 4.3 GENERIC#0 i386 |
|
|||
I assume you rebuilt the kernel & userland with gcc 4.2 as opposed to using the default gcc 3.3.5.
OpenBSD is vetted & built with gcc 3.3.5 which is installed by the comp43.tgz file set. To date, I am not aware that building the system is fully sanctioned with version 4.2. Since all packages are built with version 3.3.5, Version differences would account for why you are no longer able to use version 4.2; both the code & layout of resulting binaries are different between 3.3.5 & 4.2. Likewise, while I don't see any fundamental differences between the information provided at the following: http://www.openbsd101.com/updating.html#u4 ...& Section 5 of the FAQ: http://openbsd.org/faq/faq5.html I would recommend that you stay with information provided officially by the project itself as opposed to relying on third party sites. Last edited by ocicat; 26th August 2008 at 01:33 PM. |
|
|||
The local gcc is a modified version of gcc 3.3.5, they simply don't bump version counters.. it's inappropriate because it's not their project.
There is a man page documenting the changes to the compiler, most apparent are the stack protector changes.. It's a good read, gcc-local(1), I'm not sure, but I think the "gcc 4.2" port can coexist with the system compiler, one is in /usr and the other is in /usr/local. |
|
|||
Ok, that is a fair point. I will follow official OpenBSD manuals.
I was looking in /usr/local/bin and /usr/bin. I ended up just restarting with a fresh OpenBSD install, pkg_added g95 and then I came up with what was probably the same problem I had just had. It installs egfortran and i386-unknown-openbsd4.3- files/directories. I am assuming that the package has been updated in the last couple of days, which is why I am finding this difference. I will endeavour to read up on OpenBSD and the package system soon, but I have at least got a functioning compiler. When compiling I receive errors from gcc-4.2 about using strcpy(), sprintf() and strcat(). Is this something to do with OpenBSD gcc (3.3.5) being modified to force all calls to the safer versions of the above functions, while gcc-4.2 is not? Thanks for the assistance, sorry to ask questions that are no doubt covered in online manuals. |
|
|||
Quote:
http://openbsd.org/faq/faq15.html Likewise, you should familiarize yourself with how OpenBSD classifies its three flavors. This is covered in Section 5.1: http://openbsd.org/faq/faq5.html#Flavors |
|
|||
Quote:
Quote:
|
|
|||
The warning messages printed at compile time, are not a GCC modification, it's simply a frequently unused feature of the GNU linker.
Code:
#include <stdio.h> __warn_references(printf, "Are you using printf????? Yay!!"); int main(int argc, char **argv) { printf("This is a simplistic, unusual program.\n"); } Code:
$ gcc example.c -o example /tmp//ccw21238.o(.text+0x21): In function `main': : Are you using printf????? Yay!! $ |
|
||||
g95-4.2 has gcc-4.2 as a prereq -- in our terms, a "dependency". If you take a look at where gcc-4.2 is installed, and how it's named, using pkg_info(1) as above, you will see that gcc-4.2's main executable is /usr/local/bin/egcc. It is named egcc to avoid any confusion with the built-in gcc, cc, g++ ... executable components included in the comp*.tgz file set during install.
You will not use the 4.2 version of gcc to build any OS components or 3rd party ports unless you are both knowledgeable about the OpenBSD make system and jump through hoops to alter its operation. And then, you will eliminate security features included in OpenBSD's version of gcc which are not in gcc-4.2, assuming you get usable binary output ... which is unlikely. Whatever problem you are having is not due to installing g95. My guess is that you have not taken sufficient time to read through FAQ 5 and FAQ 15 in sufficient detail. Last edited by jggimi; 27th August 2008 at 12:56 AM. Reason: clarity, typos |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
pkg_add problems with connecting | Mr-Biscuit | NetBSD Package System (pkgsrc) | 2 | 26th May 2009 11:44 AM |
pkg_add - can't resolve <packagename> | nihonto | OpenBSD Packages and Ports | 11 | 28th January 2009 10:03 PM |
My version of pkg_add :) | DNAeon | FreeBSD Ports and Packages | 26 | 15th October 2008 06:58 AM |
pkg_add -r does not use exported packagesite | kasse | FreeBSD Ports and Packages | 16 | 26th August 2008 08:42 PM |
pkg_add error | buba | OpenBSD Packages and Ports | 4 | 13th June 2008 03:29 PM |