aMule Forum

English => Compilation problems => Topic started by: myth on August 12, 2012, 11:07:20 PM

Title: Build error 2 Scanner.cpp
Post by: myth on August 12, 2012, 11:07:20 PM
http://pastebin.com/sYF14LmQ

Ideas? I'm having a fresh Arch x86_64 install here ;)

Of course I just checked out SVN...

Title: Re: Build error 2 Scanner.cpp
Post by: myth on August 14, 2012, 07:34:45 PM
All on vacation? :P I need my aMule!
Title: Re: Build error 2 Scanner.cpp
Post by: Stu Redman on August 14, 2012, 09:08:14 PM
Please try if 10781 still works. Parsers/Scanners were regenerated in 10782 .
You could also try and delete Scanner.cpp so it gets regenerated I think (you have to install Flex for that).
Title: Re: Build error 2 Scanner.cpp
Post by: myth on August 15, 2012, 11:44:50 PM
I also tried a more older version.
Also trying to delete the Scanner.cpp doesn't help!
Flex is installed btw!

Here complete autogen, configure, make logs!

autogen (http://pastebin.com/WuC9CdsG)
configure (http://pastebin.com/zid8skkV)
make (http://pastebin.com/ZY4kZpuY)
Title: Re: Build error 2 Scanner.cpp
Post by: Stu Redman on August 17, 2012, 07:51:22 PM
Can't find an error in the make log, and have no idea why it doesn't link.  ???
Title: Re: Build error 2 Scanner.cpp
Post by: myth on August 18, 2012, 10:54:21 AM
Ok, I go and ask in Arch forums ;) Maybe they have a way!
Title: Re: Build error 2 Scanner.cpp
Post by: myth on August 18, 2012, 02:48:18 PM
The user Trilby was so kind to fix it!

I attache the diff patch!

Title: Re: Build error 2 Scanner.cpp
Post by: Stu Redman on August 18, 2012, 05:47:18 PM
That may fix the compilation but breaks the code:
Code: [Select]
< static void ReadLexBuff(char* pcBuff, int& riResult, size_t uMaxSize);
---
> static void ReadLexBuff(char* pcBuff, yy_size_t riResult, size_t uMaxSize); //MyTh fix thanks to Trilby
Now no more result value can be returned.

Quote
I also tried a more older version.
Which one? Result? Reminds me of this (http://xkcd.com/1096/).
Title: Re: Build error 2 Scanner.cpp
Post by: myth on August 18, 2012, 09:46:05 PM
Ok, I tried 10781, with same error!

So I checked out rev. 10700 and during make I get this (http://pastebin.com/RJKE7g0y)...
Title: Re: Build error 2 Scanner.cpp
Post by: Vollstrecker on August 19, 2012, 12:44:53 AM
Maybe something like the gcc-4.6/4.7 transition
Title: Re: Build error 2 Scanner.cpp
Post by: myth on August 19, 2012, 01:38:09 AM
This could be! I'm using 4.7.1 here on Arch...

Any ideas on how to fix that?
Title: Re: Build error 2 Scanner.cpp
Post by: Stu Redman on August 19, 2012, 02:01:56 PM
Looks like someone should check the build with gcc 4.7. Not before my vacation though. And I don't know if I canget it running without installing a different distro than Ubuntu anyway.  :-\
Title: Re: Build error 2 Scanner.cpp
Post by: GonoszTopi on August 19, 2012, 06:21:04 PM
I guess it's your Flex that makes compilation fail.

The latest sources in SVN pass an int variable as second argument to ReadLexBuff(), while your log complains about an yy_size_t (a.k.a. long unsigned int) type. Therefore I guess Scanner.cpp gets regenerated on your system before compilation.

I'd say you should try checking out a clean source tree (or discard all of your modifications to Scanner.{cpp,h}), then do
Code: [Select]
$ touch src/Scanner.{cpp,h} to make their timestamp newer than Scanner.l, then try compiling again. If it still fails, please check that Scanner.cpp isn't modified.
Title: Re: Build error 2 Scanner.cpp
Post by: myth on August 19, 2012, 10:49:42 PM
Lol, so easy!

I just checked out a fresh copy and after touch I can compile without a problem!

Cheers