aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: flex issues  (Read 15593 times)

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
flex issues
« on: June 19, 2007, 05:18:43 PM »

Seemingly, newer SVN versions do require newer versions of flex. Unofrtunately, configure doesn't reflect this and the LEX variable is not honoured in Makefile generation.

Attaching the fix for making the LEX variable work.
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: flex issues
« Reply #1 on: June 19, 2007, 11:08:03 PM »

AFAIK, the new flex is not required. It's just suggested to have it, but nothing happens if you don't have it, aMule compiles fine. Atl least that has been my experience until SVN from May 15th 2007, no idea if something has changed in the flex area since that date.

Regards.
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: flex issues
« Reply #2 on: June 20, 2007, 06:50:06 AM »

If you compile yesterday's SVN, you get ./Scanner.l:191: error: `yylex_destroy' undeclared (first use th
is function)

I wouldn't complain or bother to do anything, if there were no problems ;)
Logged

lfroen

  • Guest
Re: flex issues
« Reply #3 on: June 20, 2007, 07:17:26 AM »

Code: [Select]
-@GENERATE_FLEX_HEADER_TRUE@ $(LEX) --header-file=$(srcdir)/Scanner.h -o $@ $(srcdir)/Scanner.l
+@GENERATE_FLEX_HEADER_TRUE@ flex --header-file=$(srcdir)/Scanner.h -o $@ $(srcdir)/Scanner.l

I fail to see how this fixes anything. $LEX doesn't point on flex? You have 2 versions of lex installed? In any event, this patch is wrong. You must use $LEX and not "flex" for same reason, you using $CXX and not g++
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: flex issues
« Reply #4 on: June 20, 2007, 12:47:59 PM »

I bet he did the password in the wrong way, lfroen
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: flex issues
« Reply #5 on: June 20, 2007, 01:33:06 PM »

Uhm.. :blush: The patch is the wrong way around. "flex" is supposed to be replaced by $(LEX)
Logged

lillesvamp

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
Re: flex issues
« Reply #6 on: July 01, 2007, 11:14:01 AM »

Patch or no patch, I still get the ./Scanner.l:191: error: 'yylex_destroy' was not declared in this scope
error.

OS X 10.4.10, aMule-CVS-20070701, wxMac 2.8.4, flex 2.5.4
« Last Edit: July 01, 2007, 04:14:40 PM by lillesvamp »
Logged

JusTiCe8

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
    • http://perso.wanadoo.fr/justice8
Re: flex issues
« Reply #7 on: July 01, 2007, 02:31:07 PM »

Hi,

same error with today svn tarballs, Debian testing, i386, wx 2.8, flex 2.5.33-12 (same error with flex-old 2.5.4a-7 package, don't ask me why version number are such amazing, don't know)
Logged

qwick

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
Re: flex issues
« Reply #8 on: July 02, 2007, 11:59:24 PM »

try setting the mtime for src/Parser.cpp to older than src/Scanner.cpp
or src/Scanner.cpp to newer than src/Parser.cpp
this will avoid regenerating src/Scanner.cpp,  src/Scanner.h

Between CVS tar balls 20070618 and 20070619 src/Parser.cpp was updated
causing its mtime to be newer than src/Scanner.cpp
(only the copyright comment was changed)

with flex that doesn't support --header-file the files src/Scanner.cpp,  src/Scanner.h
are regenerated incorrectly.
Logged

JusTiCe8

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
    • http://perso.wanadoo.fr/justice8
Re: flex issues
« Reply #9 on: July 03, 2007, 10:47:16 AM »

I have disable the line with missing sub call, compile is ok, and I use amule daemon with text client, it's work, and perhaps there is no link, but sometime a search lead to a crash of daemon, so it's quite good  ::) until a true fix.

here is a full bt just in case it help
Quote
#0  yylex () at Scanner.cpp:772
   yy_current_state = 38
   yy_cp = 0x0
   yy_bp = 0x0
   yy_act = 400
#1  0x082a1bdd in yyparse () at Parser.cpp:1273
   yysize = <value optimized out>
   yystate = 0
   yyn = <value optimized out>
   yyresult = <value optimized out>
   yyerrstatus = 0
   yytoken = 0
   yyssa = {0, -20559, -19812, 2066, 28019, 0, 16064, 2158, 6424, -20559, 5217, -22538, 10252, -22538,
     ... blah blah blah ...
2494, 32240, 2561, 18, 0, 6800, -20559, 100, 0, 0, 0}
   yyss = (yytype_int16 *) 0xafb118d8
   yyssp = (yytype_int16 *) 0xafb118d8
   yyvsa = {{pstr = 0xafb11868, pexpr = 0xafb11868}, {pstr = 0x8102cc4, pexpr = 0x8102cc4}, {
    ... blah blah blah ...
pexpr = 0xafb11ab8}}
   yyvs = (YYSTYPE *) 0xafb11858
   yyvsp = (YYSTYPE *) 0xafb115b8
   yystacksize = 200
   yyval = {pstr = 0xafb11a98, pexpr = 0xafb11a98}
   yylen = -1347348356
#2  0x08127f46 in CSearchList::CreateSearchData (this=0x86e3e20, params=@0xafb11bcc, type=GlobalSearch)
    at ../../src/SearchList.cpp:690
   kad = false
   parametercount = 0
   typeText = {<wxStringBase> = {static npos = 4294967295, m_pchData = 0xa7ef0e60}, <No data fields>}
   data = {_M_ptr = 0xa2caa68}
   iParseResult = <value optimized out>
   target = {m_data = 0x3, m_eStrEncode = 2947619592}
   iParameterCount = <value optimized out>
#3  0x08129da2 in CSearchList::StartNewSearch (this=0x86e3e20, searchID=0xafb11be8, type=GlobalSearch,
    params=@0xafb11bcc) at ../../src/SearchList.cpp:331
   data = {_M_ptr = 0xa237b10}
#4  0x080f06d5 in Get_EC_Response_Search (request=0x9de4d28) at ../../src/ExternalConn.cpp:742
   search_id = 4294967295
   error = {<wxStringBase> = {static npos = 4294967295, m_pchData = 0x99a7cf4}, <No data fields>}
   response = {<wxStringBase> = {static npos = 4294967295, m_pchData = 0xa7ef0e60}, <No data fields>}
   search_request = <value optimized out>
   params = {searchString = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0x9c9c3ac}, <No data fields>}, typeText = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0xa7ef0e60}, <No data fields>}, extension = {<wxStringBase> = {static npos = 4294967295,
      m_pchData = 0xa7ef0e60}, <No data fields>}, minSize = 0, maxSize = 0, availability = 0}
   search_type = <value optimized out>
   core_search_type = 400
   reply = <value optimized out>
#5  0x080f3e27 in ExternalConn::ProcessRequest2 (request=0x9de4d28, enc_part_map=@0x85f2070,
    enc_shared_map=@0x85f2094, objmap=@0x85f20b8) at ../../src/ExternalConn.cpp:1163
   it = {<__gnu_debug::_Safe_iterator_base> = {_M_sequence = 0x85f37f8, _M_version = 164749968,
    _M_prior = 0xafb12168, _M_next = 0x80f7202}, _M_current = {_M_current = 0xafb1217c}}
   detail_level = <value optimized out>
   servers = {<__gnu_norm::vector<const CServer*,std::allocator<const CServer*> >> = {<__gnu_norm::_Vector_base<const CServer*,std::allocator<const CServer*> >> = {
      _M_impl = {<std::allocator<const CServer*>> = {<__gnu_cxx::new_allocator<const CServer*>> = {<No data fields>}, <No data fields>}, _M_start = 0x9bd0a45, _M_finish = 0x1,
        _M_end_of_storage = 0x80f72cc}}, <No data fields>}, <__gnu_debug::_Safe_sequence<__gnu_debug_def::vector<const CServer*, std::allocator<const CServer*> > >> = {<__gnu_debug::_Safe_sequence_base> = {
      _M_iterators = 0x1, _M_const_iterators = 0x85f1f9c, _M_version = 2947621192}, <No data fields>},
  _M_guaranteed_capacity = 136939362}
   response = (CECPacket *) 0x0
#6  0x080f55a6 in CECServerSocket::OnPacketReceived (this=0x85f1f28, packet=0x190)
    at ../../src/ExternalConn.cpp:87
   reply = <value optimized out>
#7  0x0829966c in CECSocket::OnInput (this=0x85f1f28) at ../../../../../src/libs/ec/cpp/ECSocket.cpp:341
   reply = {_M_ptr = 0x83d3b48}
   packet = {_M_ptr = 0x9de4d28}
   bytes_rx = <value optimized out>
#8  0xa7e2c4af in wxAppConsole::HandleEvent () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#9  0xa7ecf23c in wxEvtHandler::ProcessEventIfMatches () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#10 0xa7ecf40e in wxEventHashTable::HandleEvent () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#11 0xa7ecf5b6 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#12 0xa7ecfa9f in wxEvtHandler::ProcessPendingEvents () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#13 0xa7e2c76a in wxAppConsole::ProcessPendingEvents () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#14 0x08059686 in CamuleDaemonApp::OnRun (this=0x85da150) at ../../src/amuled.cpp:427
   warning = {<wxStringBase> = {static npos = 4294967295, m_pchData = 0xa7ded590}, <No data fields>}
#15 0xa7e6655e in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#16 0xa7e66612 in wxEntry () from /usr/lib/libwx_baseu-2.8.so.0
No symbol table info available.
#17 0x08059730 in main (argc=Cannot access memory at address 0x1
) at ../../src/amuled.cpp:101
No locals.
« Last Edit: July 04, 2007, 05:41:16 PM by JusTiCe8 »
Logged

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: flex issues
« Reply #10 on: July 05, 2007, 02:46:13 PM »

The patch doesn't do anything if you don't have a flex version new enough and if you don't point the LEX variable to it. The patch is here for people who have compiled a newer version themselves and are not interested in replacing the system flex.

I see that the patch still hasn't made it to SVN. Come on.. It's not that hard to run "patch -R" instead of "patch", is it?
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: flex issues
« Reply #11 on: July 05, 2007, 08:48:00 PM »

Hi nodsu:

Maybe because the patch is wrong. ;) You have to patch makefile.am or your patch will be removed upon running autogen.sh.

Before changing anything: (I dislike makefiles and don't know a lot about them)

Is the $LEX-variable defined by configure? There's no such variable in my system.
Logged

lfroen

  • Guest
Re: flex issues
« Reply #12 on: July 06, 2007, 09:53:39 PM »

Quote
You have to patch makefile.am or your patch will be removed upon running autogen.sh.
Correct.

Quote
Is the $LEX-variable defined by configure?
Yes. Similarly to $CXX for example.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: flex issues
« Reply #13 on: July 06, 2007, 11:49:25 PM »

Then you can regard it as patched as of tomorrow. (replaced flex by $(LEX) in src/Makefile.am and lex by $(LEX) in src/webserver/src/Makefile.am)
Logged

lillesvamp

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8
Re: flex issues
« Reply #14 on: July 07, 2007, 12:49:21 AM »

I've compiled the latest flex from cvs and set LEX to its path, applied the patch, tried to make the changes in the Makefile.am files. Still the same error.
« Last Edit: July 07, 2007, 12:52:12 AM by lillesvamp »
Logged
Pages: [1] 2