From: Dave B. <db...@Co...> - 2017-03-27 23:16:35
|
Hi Susan, That is certainly a strange error. I see that you are using gcc 5.3 on a RHEL system. I've recently compiled GENESIS under Fedora 20 with gcc 4.8, and Fedora 25 with gcc 6.3. The older compiler worked fine, but for the newer compiler, I found that very recent glibc versions removed a deprecated definition in <sys/wait.h>, and I had to make a change in src/sys/system.c. If anyone needs this fix, I can put this change on the github repo**at https://github.com/genesis-sim/genesis-2.4. <https://github.com/genesis-sim/genesis-2.4> This is where I put the latest fixes and changes. This wasn't your problem, but it could be something to do with a change in a file included by sys/code_lib.c, which dates from 2005 and earlier. Perhaps this caused the undefined reference to 'yylex' or the multiple definitions of 'main', which is only defined once in code_lib.c. Can you send me (but not the whole mailing list) your full make.out file, and the Makefile that was generated by ./configure? I will do what I can to solve this. Dave Beeman On 03/27/2017 02:48 PM, Susan Chacko wrote: > Hi, > > I'm attempting to compile Genesis 2.4 from source in response to one of > our users, and am hitting a wall here. > > To summarize, I did a > ./configure --prefix=/some/path/here > > The configure went fine (config output appended at the end of this > message). > The subsequent make failed. The first error was in the 'sys' subdirectory: > > $ /usr/local/GCC/5.3.0/bin/gcc -O2 -D__NO_MATH_INLINES -DBSD -DLinux > -lfl -DBSD -o code_lib code_lib.c > /tmp/ccLCiLkb.o: In function `main': > code_lib.c:(.text.startup+0x0): multiple definition of `main' > /usr/lib/../lib64/libfl.a(libmain.o):(.text+0x0): first defined here > /usr/lib/../lib64/libfl.a(libmain.o): In function `main': > (.text+0xb): undefined reference to `yylex' > collect2: error: ld returned 1 exit status > > Any ideas what is going on? It seems to be related to the flex library. > We have the following flex libraries installed: > > flex-2.5.35-9.el6.x86_64 > flex-devel-2.5.35-9.el6.x86_64 > > Any suggestions for how to proceed? Much appreciated. > Susan > > -----------configure output---------------- > checking for gcc... /usr/local/GCC/5.3.0/bin/gcc > checking whether the C compiler works... yes > checking for C compiler default output file name... a.out > checking for suffix of executables... > checking whether we are cross compiling... no > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether /usr/local/GCC/5.3.0/bin/gcc accepts -g... yes > checking for /usr/local/GCC/5.3.0/bin/gcc option to accept ISO C89... > none needed > checking how to run the C preprocessor... /usr/local/GCC/5.3.0/bin/gcc -E > checking for X... libraries , headers > checking for gethostbyname... yes > checking for connect... yes > checking for remove... yes > checking for shmat... yes > checking for IceConnectionNumber in -lICE... yes > checking for ranlib... ranlib > checking for bison... bison -y > checking for flex... flex > checking lex output file root... lex.yy > checking lex library... -lfl > checking whether yytext is a pointer... yes > checking for main in -lncurses... yes > checking for grep that handles long lines and -e... /bin/grep > checking for egrep... /bin/grep -E > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking size of long int... 8 > configure: creating ./config.status > config.status: creating Makefile > > > > |