Menu

#4 compile error on gnu/linux x86_64

open
5
2008-10-21
2008-10-21
Anonymous
No

>>> uname -a
Linux g12-1-app-04 2.6.16.21-0.9-smp #1 SMP Mon Jul 3 11:25:39 PDT 2006 x86_64 x86_64 x86_64 GNU/Linux

>>> gcc --version
gcc (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

>>> flex --version
flex version 2.5.4

>>> make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-linux-gnu

-----------------------

I have no control over what compilers and other tools we have
installed here, so i made sure that the latest version of gcc was at
the front of my path. No doxygen installed, but don't need the docs
built/installed. I did a generic `./configure`, which succeeded. Then
i did `make`, which died. Here's the last few lines of output:

make[3]: Entering directory `/usr2/c_eholbr/dev/c/jaula-1.3.0/examples'
g++ -DHAVE_CONFIG_H -I. -I.. -I ../jaula -g -O2 -MT jparse.o -MD -MP -MF .deps/jparse.Tpo -c -o jparse.o jparse.cc
mv -f .deps/jparse.Tpo .deps/jparse.Po
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o jparse jparse.o ../jaula/libjaula.la
mkdir .libs
g++ -g -O2 -o .libs/jparse jparse.o ../jaula/.libs/libjaula.so -Wl,--rpath -Wl,/usr2/c_eholbr/local/lib
../jaula/.libs/libjaula.so: undefined reference to `jaulaFlexLexer::yy_pop_state()'
../jaula/.libs/libjaula.so: undefined reference to `jaulaFlexLexer::yy_push_state(int)'
collect2: ld returned 1 exit status
make[3]: *** [jparse] Error 1
make[3]: Leaving directory `/usr2/c_eholbr/dev/c/jaula-1.3.0/examples'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr2/c_eholbr/dev/c/jaula-1.3.0/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr2/c_eholbr/dev/c/jaula-1.3.0'
make: *** [all] Error 2

Any idea what i did wrong here?

thanks,
Eric

Discussion

  • Kombo Morongo

    Kombo Morongo - 2008-10-24

    yy_* methods are located at jaula_lexan.cc and this file is created by flex from jaula_lexan.ll.

    My advice is to erase jaula_lexan.cc and run again make. If it doesn't work, you could at least see if there any errors running flex that could lead you to the original problem.

    Please tell me if it works or extend this support request by adding the report from flex.

    Regards,

    Morongo

     
  • Kombo Morongo

    Kombo Morongo - 2008-10-24

    yy_* methods are located at jaula_lexan.cc and this file is created by flex from jaula_lexan.ll.

    My advice is to erase jaula_lexan.cc and run again make. If it doesn't work, you could at least see if there any errors running flex that could lead you to the original problem.

    Please tell me if it works or extend this support request by adding the report from flex.

    Regards,

    Morongo

     
  • xibios

    xibios - 2009-03-09

    I just get the same problem compiling with flex coming with a RedHat ES 4 (Update 5) using x86_64 architecture (flex-2.5.4a-33)..While it's compiling fine on an Ubuntu 8.04 using i686 architecture (flex 2.5.34-2.1).

    After commenting few lines in jaula_lexan.cc it compiles and works ok.

    #if YY_STACK_USED
    ...
    #else
    //#define YY_NO_PUSH_STATE 1
    //#define YY_NO_POP_STATE 1
    //#define YY_NO_TOP_STATE 1
    #endif

    A bug in that version of flex ??....

    Emmanuel

     
  • Kombo Morongo

    Kombo Morongo - 2009-03-10

    From the output provided I can see that library was succesfully compiled but that there are symbols that cannot be found while linking the examples.

    In order to check if the symbols are already present in the library, run the following command from the project home:

    nm --dynamic --demangle jaula/.libs/libjaula.so | grep jaulaFlexLexer

    If you can see yy_pop_state() and yy_push_state(int) symbols with a symbol type that is not U (in my system both symbols appear with a symbol type T), the library is already there and it is complete and problems may be with examples not being able to find it.

    If this is the case and you have the complete autotools packages installed (autoconf, automake and libtool) you may try to statically link the examples by adding the following line in examples/Makefile.am :

    jparse_LDFLAGS = -static

    It will be clearer if you add this line just below the line beginning with jparse_LDADD and it may already exist in your sources and be hidden behind a comment symbol (two hash characters). If this is the case, just uncomment the existing line in order to activate it.

    If autotools are correctly installed, running make from the project base will start a reconfiguration of the project and the recompile it automatically. If it doesn't work run the following commands from the project base:

    autoheader
    libtoolize --copy --force
    automake --add-missing --copy
    autoconf
    ./configure
    make

    I hope this can clear the problem. Please tell me if it works or not and, if it is still not working, please come back with the problems you have found so I can see what may be happening and suggest you a way to overcome it.

    Regards,

    Morongo

     
  • Nobody/Anonymous

    Adding "%option stack" to jaula_lexan.ll fixed the very same issue for me.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.