aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: fail build all versions: undefined reference to `MULE_EVT_LOGLINE'  (Read 2944 times)

sl1pkn07

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30

Code: [Select]
amulecmd-LoggerConsole.o: In function `CLoggingEvent::Clone() const':
LoggerConsole.cpp:(.text._ZNK13CLoggingEvent5CloneEv[_ZNK13CLoggingEvent5CloneEv]+0x3b): undefined reference to `MULE_EVT_LOGLINE'
collect2: error: ld returned 1 exit status
Makefile:1123: recipe for target 'amulecmd' failed

Code: [Select]
  Configure script has finished system check.

  Configured aMule SVN (rev. 10848) for 'x86_64-unknown-linux-gnu'.

  aMule enabled options:

  **** aMule Core ****
  Prefix where aMule should be installed?                    /usr
  Should aMule be compiled with i18n support?                yes
  Should aMule be compiled in debug mode?                    no
  Should aMule be compiled with profiling?                   no
  Should aMule be compiled with optimizations?               yes
  Should aMule be compiled with UPnP support?                yes
  Should aMule be compiled with IP2country support?          no
  Should aMule monolithic application be built?              no
  Should aMule daemon version be built?                      yes
  Should aMule remote gui be built?                          no
  Crypto++ library/headers style?                            installed

  **** aMule TextClient ****
  Should aMule Command Line Client be built?                 yes

  **** aMule WebServer ****
  Should aMule WebServer be built?                           yes

  **** aMule ED2K Links Handler ****
  Should aMule ED2K Links Handler be built?                  yes

  **** aMuleLinkCreator ****
  Should aMuleLinkCreator GUI version (alc) be built?        no
  Should aMuleLinkCreator for console (alcc) be built?       yes

  **** aMule Statistics ****
  Should C aMule Statistics (CAS) be built?                  no
  Should aMule GUI Statistics (wxCas) be built?              no
  Should xas XChat2 plugin be installed?                     no
  Should plasmaMule plasma-applet be build?                  no

  **** General Libraries and Tools ****
  Should ccache support be enabled?                          yes
  Libraries aMule will use to build:
                             wxWidgets             3.0.1 (gtk2,shared)
                             crypto++              5.6.2 (installed, in /usr)
                             libupnp               1.6.19
                             libintl               system
                             libpng                1.6.16
                             zlib                  1.2.8

tested with from r10848 to r10866 all builds failed
tested with wxbase/wxgtk 3.0.1 builds failed
tested with wxbase/wxgtk 2.8.12.1 builds ok in all revisions

all is build with gcc 4.9.2

greetings
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 165
  • Offline Offline
  • Posts: 2674
Re: fail build all versions: undefined reference to `MULE_EVT_LOGLINE'
« Reply #1 on: January 26, 2015, 10:09:38 AM »

Here it builds without problems with both wxWidgets 3.0.1 and 3.0.2. GCC 4.4.2, if it matters. You can try adding DEFINE_LOCAL_EVENT_TYPE(MULE_EVT_LOGLINE) near the top of LoggerConsole.cpp (after the #include lines) to see if it fixes the build.
Logged
concordia cum veritate

sl1pkn07

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re: fail build all versions: undefined reference to `MULE_EVT_LOGLINE'
« Reply #2 on: January 26, 2015, 09:49:38 PM »

Hi, with you post. the error is gone. but still fail build

with clang 3.5.1

Code: [Select]
/usr/bin/ccache clang++ -DHAVE_CONFIG_H -I. -I..  -DUSE_WX_EXTENSIONS -I/usr/lib/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -DwxUSE_GUI=0 -I./libs -I./include -I/usr/include -D__WEAK_CRYPTO__ -I/usr/include/upnp  -DENABLE_UPNP=1 -D_FORTIFY_SOURCE=2 -W -Wall -Wshadow -Wundef -O2 -march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -MT libmuleappcore_a-IPFilterScanner.o -MD -MP -MF .deps/libmuleappcore_a-IPFilterScanner.Tpo -c -o libmuleappcore_a-IPFilterScanner.o `test -f 'IPFilterScanner.cpp' || echo './'`IPFilterScanner.cpp
IPFilterScanner.cpp:880:75: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
  if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) ) {
       ~                                                                  ^~~~~~
                                                                          false
IPFilterScanner.cpp:1243:107: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
  if ( (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive ) { int c = '*'; int n; for ( n = 0; n < (size_t) num_to_read && (c = _IO_getc (yyipin)) != (-1) && c != '\n'; ++n ) (&(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[number_to_move])[n] = (char) c; if ( c == '\n' ) (&(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[number_to_move])[n++] = (char) c; if ( c == (-1) && ferror( yyipin ) ) yy_fatal_error( "input in flex scanner failed" ); (yy_n_chars) = n; } else { (*__errno_location ())=0; while ( ((yy_n_chars) = fread((&(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[number_to_move]), 1, (size_t) num_to_read, yyipin))==0 && ferror(yyipin)) { if( (*__errno_location ()) != 4) { yy_fatal_error( "input in flex scanner failed" ); break; } (*__errno_location ())=0; clearerr(yyipin); } };
                                                                                                        ~ ^ ~~~~~~~~~~~~~~~~~~~~
IPFilterScanner.cpp:1464:74: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) ){
      ~                                                                  ^~~~~~
                                                                         false
IPFilterScanner.cpp:1490:72: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if ( ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) )
 ~~                                                                    ^~~~~~
                                                                       false
IPFilterScanner.cpp:1639:72: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if ( ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) )
 ~~                                                                    ^~~~~~
                                                                       false
IPFilterScanner.cpp:1648:71: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if (( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null))
 ~~                                                                   ^~~~~~
                                                                      false
IPFilterScanner.cpp:1663:76: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
     if (!( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null))
         ~                                                                 ^~~~~~
                                                                           false
IPFilterScanner.cpp:1671:71: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if (( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null)) {
 ~~                                                                   ^~~~~~
                                                                      false
IPFilterScanner.cpp:1949:73: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 while(( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null)){
 ~~~~~                                                                  ^~~~~~
                                                                        false
IPFilterScanner.cpp:1343:17: warning: unused function 'yyunput' [-Wunused-function]
    static void yyunput (int c, register char * yy_bp )
                ^
IPFilterScanner.cpp:1382:16: warning: function 'yyinput' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    static int yyinput (void)
               ^
11 warnings generated.
mv -f .deps/libmuleappcore_a-IPFilterScanner.Tpo .deps/libmuleappcore_a-IPFilterScanner.Po
flex --header-file=./Scanner.h -o Scanner.cpp ./Scanner.l
/usr/bin/ccache clang++ -DHAVE_CONFIG_H -I. -I..  -DUSE_WX_EXTENSIONS -I/usr/lib/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -DwxUSE_GUI=0 -I./libs -I./include -I/usr/include -D__WEAK_CRYPTO__ -I/usr/include/upnp  -DENABLE_UPNP=1 -D_FORTIFY_SOURCE=2 -W -Wall -Wshadow -Wundef -O2 -march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -MT libmuleappcore_a-Scanner.o -MD -MP -MF .deps/libmuleappcore_a-Scanner.Tpo -c -o libmuleappcore_a-Scanner.o `test -f 'Scanner.cpp' || echo './'`Scanner.cpp
./Scanner.l:214:5: warning: 'YY_STACK_USED' is not defined, evaluates to 0 [-Wundef]
#if YY_STACK_USED
    ^
1 warning generated.
Scanner.cpp:784:75: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
  if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) ) {
       ~                                                                  ^~~~~~
                                                                          false
Scanner.cpp:1240:3: error: no matching function for call to 'ReadLexBuff'
  ReadLexBuff( (&(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[number_to_move]),
  ^~~~~~~~~~~
./Scanner.l:28:13: note: candidate function not viable: no known conversion from 'yy_size_t' (aka 'unsigned long') to 'int &' for 2nd argument
static void ReadLexBuff(char* pcBuff, int& riResult, size_t uMaxSize);
            ^
Scanner.cpp:1458:74: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) ){
      ~                                                                  ^~~~~~
                                                                         false
Scanner.cpp:1484:72: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if ( ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) )
 ~~                                                                    ^~~~~~
                                                                       false
Scanner.cpp:1629:72: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if ( ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null) )
 ~~                                                                    ^~~~~~
                                                                       false
Scanner.cpp:1638:71: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if (( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null))
 ~~                                                                   ^~~~~~
                                                                      false
Scanner.cpp:1653:76: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
     if (!( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null))
         ~                                                                 ^~~~~~
                                                                           false
Scanner.cpp:1661:71: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 if (( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null)) {
 ~~                                                                   ^~~~~~
                                                                      false
Scanner.cpp:1939:73: warning: implicit conversion of NULL constant to 'bool' [-Wnull-conversion]
 while(( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : __null)){
 ~~~~~                                                                  ^~~~~~
                                                                        false
8 warnings and 1 error generated.
Makefile:1757: recipe for target 'libmuleappcore_a-Scanner.o' failed
make[3]: *** [libmuleappcore_a-Scanner.o] Error 1
make[3]: Leaving directory '/home/sl1pkn07/aplicaciones/amule-daemon/src/amule/src'
Makefile:5347: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/sl1pkn07/aplicaciones/amule-daemon/src/amule/src'
Makefile:529: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/sl1pkn07/aplicaciones/amule-daemon/src/amule'
Makefile:423: recipe for target 'all' failed
make: *** [all] Error 2

with gcc 4.9.2

Code: [Select]
/usr/bin/ccache g++ -DHAVE_CONFIG_H -I. -I..  -DUSE_WX_EXTENSIONS -I/usr/lib/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -DwxUSE_GUI=0 -I./libs -I./include -I/usr/include -D__WEAK_CRYPTO__ -I/usr/include/upnp  -DENABLE_UPNP=1 -D_FORTIFY_SOURCE=2 -W -Wall -Wshadow -Wundef -O2 -march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -MT libmuleappcore_a-Scanner.o -MD -MP -MF .deps/libmuleappcore_a-Scanner.Tpo -c -o libmuleappcore_a-Scanner.o `test -f 'Scanner.cpp' || echo './'`Scanner.cpp
./Scanner.l:214:5: warning: "YY_STACK_USED" is not defined [-Wundef]
  yy_start_stack_ptr = 0;
     ^
Scanner.cpp: In function 'int yy_get_next_buffer()':
Scanner.cpp:1241:30: error: invalid initialization of reference of type 'int&' from expression of type 'yy_size_t {aka long unsigned int}'
    (yy_n_chars), num_to_read );
                              ^
./Scanner.l:28:13: note: in passing argument 2 of 'void ReadLexBuff(char*, int&, size_t)'
 static void ReadLexBuff(char* pcBuff, int& riResult, size_t uMaxSize);
             ^
Scanner.cpp: At global scope:
Scanner.cpp:1803:13: warning: 'void yy_fatal_error(const char*)' defined but not used [-Wunused-function]
 static void yy_fatal_error (yyconst char* msg )
             ^
Makefile:1757: recipe for target 'libmuleappcore_a-Scanner.o' failed
make[3]: *** [libmuleappcore_a-Scanner.o] Error 1
make[3]: Leaving directory '/home/sl1pkn07/aplicaciones/amule-daemon/src/amule/src'
Makefile:5347: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/sl1pkn07/aplicaciones/amule-daemon/src/amule/src'
Makefile:529: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/sl1pkn07/aplicaciones/amule-daemon/src/amule'
Makefile:423: recipe for target 'all' failed
make: *** [all] Error 2

complete buildlog
clang: http://sl1pkn07.wtf/paste/view/510ba4fb
gcc: http://sl1pkn07.wtf/paste/view/b12ad1ed

if help. all system is build with this flags (archlinux packages)

LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
CFLAGS="-march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
CXXFLAGS="-march=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"

flex 2.5.39
wxbase:

Code: [Select]
      --prefix=/usr
      --libdir=/usr/lib
      --with-regex=builtin
      --enable-unicode
      --disable-{precomp-headers,gui}

greetings
« Last Edit: January 26, 2015, 10:00:41 PM by sl1pkn07 »
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 165
  • Offline Offline
  • Posts: 2674
Re: fail build all versions: undefined reference to `MULE_EVT_LOGLINE'
« Reply #3 on: January 30, 2015, 06:31:18 PM »

Ok, guessing you're using an SVN checkout to build aMule from. Please find all changed file in the source tree ("svn status" will show them), and just revert them to the state their original state ("svn revert ..."). Check that their timestamps are newer than the other files, if not, you'll need to touch them ("touch ..."). Then try building again.

The problem is, that in some parts of the source we assume certain variables to have a certain type. With flex evolving, this isn't always true, that's why you'll have to prevent these files being regenerated.

If instead you're building from a tarball, then delete the source tree, extract the tarball again. The files you'll have to touch are src/Scanner.{cpp,h} src/IPFilterScanner.{cpp,h}. Maybe others too, I don't know by heart now.
Logged
concordia cum veritate

sl1pkn07

  • Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re: fail build all versions: undefined reference to `MULE_EVT_LOGLINE'
« Reply #4 on: January 31, 2015, 04:15:11 PM »

EDIT2: nevermind, now works :S

if run autogen.sh before, fix the build in all sources :S

sorry the inconvenience

note: 'DEFINE_LOCAL_EVENT_TYPE(MULE_EVT_LOGLINE)' still need
« Last Edit: January 31, 2015, 04:37:03 PM by sl1pkn07 »
Logged