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: Compiling amuleweb on windows (I can't)  (Read 12978 times)

Crakem

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 103
Compiling amuleweb on windows (I can't)
« on: March 06, 2008, 08:17:45 PM »

I don't find any in wiki saying I can't compile amuleweb on windows. I trying it and 'make' miss regex.h, I think it's glibc which is missing, isn't it? I rode there is not support for it in linux (has not linux port) so I find in mingw at sourceforge an user contributed source for regex, I compiled it and rerun make for amuleweb but another time regex.h could not be found so I change line 30 of php_core_lib.cpp to:
Code: [Select]
#include <C:\msys\1.0\include\regex.h>
doing that regex.h is OK and that's newest I found:
Code: [Select]
amuleweb-php_core_lib.o:php_core_lib.cpp:(.text+0x3534): undefined reference to `regcomp'
amuleweb-php_core_lib.o:php_core_lib.cpp:(.text+0x359f): undefined reference to `regexec'
amuleweb-php_core_lib.o:php_core_lib.cpp:(.text+0x3638): undefined reference to `regfree'
amuleweb-php_core_lib.o:php_core_lib.cpp:(.text+0x3665): undefined reference to `regerror'
collect2: ld returned 1 exit status
make[4]: *** [amuleweb.exe] Error 1
make[4]: Leaving directory `/home/enrique/build/amule-cvs/src/webserver/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/enrique/build/amule-cvs/src/webserver'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/enrique/build/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/enrique/build/amule-cvs'
make: *** [all] Error 2
Maybe regex is not so complete as I need or maybe there is missing libs?
Thanks all for replies.
Logged

lfroen

  • Guest
Re: Compiling amuleweb on windows (I can't)
« Reply #1 on: March 07, 2008, 01:13:45 PM »

Yep, you're missing lib (regex)
Logged

Crakem

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 103
Re: Compiling amuleweb on windows (I can't)
« Reply #2 on: March 07, 2008, 04:34:14 PM »

Yep, you're missing lib (regex)
Yeah, I found mingw-libgnurx-2.5.1 (mingw regex) have to be configured with:
Code: [Select]
./configure --prefix=/mingw && make && make install and then I could maintain php_core_lib.cpp untouched (regex.h is found finally with #include <regex.h>)
But library is not found:
Code: [Select]
amuleweb-WebInterface.o:WebInterface.cpp:(.rdata$_ZTV12CamulewebApp[vtable for CamulewebApp]+0x44): undefined reference to `wxEvtHandler::GetClassInfoW() const'
amuleweb-php_core_lib.o:php_core_lib.cpp:(.text+0x3534): undefined reference to `regcomp'
amuleweb-php_core_lib.o:php_core_lib.cpp:(.text+0x359f): undefined reference to `regexec'
amuleweb-php_core_lib.o:php_core_lib.cpp:(.text+0x3638): undefined reference to `regfree'
amuleweb-php_core_lib.o:php_core_lib.cpp:(.text+0x3665): undefined reference to `regerror'
collect2: ld returned 1 exit status
make[4]: *** [amuleweb.exe] Error 1
I try changing makefiles like this:
Code: [Select]
amuleweb_LDFLAGS = -L../../../../../usr/lib $(LIBPNG_LDFLAGS) -L../../libs/common -L../../libs/ec/cpp
amuleweb_LDADD = -lregex -lec -lmulecommon $(WXBASE_LIBS) $(ZLIB_LIBS) \
and I got:
Code: [Select]
amuleweb-WebInterface.o:WebInterface.cpp:(.rdata$_ZTV12CamulewebApp[vtable for CamulewebApp]+0x44): undefined reference to `wxEvtHandler::GetClassInfoW() const'
collect2: ld returned 1 exit status
make[4]: *** [amuleweb.exe] Error 1
make[4]: Leaving directory `/home/enrique/build/amule-cvs/src/webserver/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/enrique/build/amule-cvs/src/webserver'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/enrique/build/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/enrique/build/amule-cvs'
make: *** [all] Error 2
Any ideas? Please it's possible compiling it with mingw and msys? There is no information in wiki about it
Thanks lfroen for so fast reply
NOTE: I building in windows mingw with msys (last release)
« Last Edit: March 07, 2008, 05:21:38 PM by Crakem »
Logged

Crakem

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 103
Re: Compiling amuleweb on windows (I can't)
« Reply #3 on: March 07, 2008, 05:50:45 PM »

I got regex at the list end, here:
Code: [Select]
http://sourceforge.net/project/showfiles.php?group_id=2435Perhaps another silly as me are interested in trying to compile it  :D
Regards
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4379
Re: Compiling amuleweb on windows (I can't)
« Reply #4 on: March 08, 2008, 12:13:21 AM »

Are they identical with this one: http://gnuwin32.sourceforge.net/packages/regex.htm ?

Please give it a try.
Logged

Crakem

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 103
Re: Compiling amuleweb on windows (I can't)
« Reply #5 on: March 08, 2008, 04:27:44 PM »

Are they identical with this one: http://gnuwin32.sourceforge.net/packages/regex.htm ?
I try it but I got
Code: [Select]
regcomp.c:244: warning: 're_syntax_options' defined locally after being referenced with dllimport linkage
 gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT regex.lo -MD -MP -MF .deps/regex.Tpo -c regex.c -o regex.o >/dev/null 2>&1
mv -f .deps/regex.Tpo .deps/regex.Plo
make[2]: *** No rule to make target `regex-dllversion.c', needed by `regex-dllversion.lo'.  Stop.
make[2]: Leaving directory `/home/enrique/build/regex-2.7-src/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/enrique/build/regex-2.7-src'
make: *** [all] Error 2
Maybe a bug in lib?  ???

I try too installer, and compiling again amuleweb:
Code: [Select]
amuleweb-WebInterface.o:WebInterface.cpp:(.rdata$_ZTV12CamulewebApp[vtable for CamulewebApp]+0x44): undefined reference to `wxEvtHandler::GetClassInfoW() const'
collect2: ld returned 1 exit status
make[4]: *** [amuleweb.exe] Error 1
make[4]: Leaving directory `/home/enrique/build/amule-cvs/src/webserver/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/enrique/build/amule-cvs/src/webserver'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/enrique/build/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/enrique/build/amule-cvs'
make: *** [all] Error 2
I got same error!  :o maybe I have to look for wxEvtHandler in wxWidgets, maybe make is using some limited command in msys ???
« Last Edit: March 10, 2008, 10:46:32 PM by Crakem »
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4379
Re: Compiling amuleweb on windows (I can't)
« Reply #6 on: March 08, 2008, 07:09:02 PM »

Ah, not again...this is a problem which happens quite often on mingw...I'll try to compile it later on my system and see how I can get around this.
Logged

Crakem

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 103
Re: Compiling amuleweb on windows (I can't)
« Reply #7 on: March 09, 2008, 03:39:09 PM »

Ah, not again...this is a problem which happens quite often on mingw...I'll try to compile it later on my system and see how I can get around this.
Thanks wuischke, I'm unhappy with mingw, I hope I could mount a cross compiler in few time and problems disappear finally but gentoo have not cross compiler ready yet.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4379
Re: Compiling amuleweb on windows (I can't)
« Reply #8 on: March 09, 2008, 03:53:13 PM »

No, it happens on my cross-compiler, too. It's mingw32 after all. ;)

The problem is with a macro which replaces function names. You can try to include <wx/msw/winundef.h> in the file causing the error, this sometimes helps. (This will undefine the macro)
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4379
Re: Compiling amuleweb on windows (I can't)
« Reply #9 on: March 14, 2008, 06:35:59 PM »

OK, you can get around the regex errors by creating empty .c-files for the missing ones.

I seem to have some problem with my cross-compiler, I get a lot of errors failing to link to standard library functions. It worked fine when I recompiled wxMSW, so it should be related to aMule...:( I'll see what I can do about it.

Edit: Argh, it always tries to use Linux libraries...why can't it stay out of /usr/ and use /usr/i486-mingw32/ like it should? Anyway, I can reproduce your error now.
« Last Edit: March 14, 2008, 06:42:54 PM by wuischke »
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 147
  • Offline Offline
  • Posts: 2403
Re: Compiling amuleweb on windows (I can't)
« Reply #10 on: March 21, 2008, 02:44:56 AM »

Code: [Select]
amuleweb-WebInterface.o:WebInterface.cpp:(.rdata$_ZTV12CamulewebApp[vtable for CamulewebApp]+0x44): undefined reference to `wxEvtHandler::GetClassInfoW() const'
collect2: ld returned 1 exit status
Fixed.
Logged
concordia cum veritate

Crakem

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 103
Re: Compiling amuleweb on windows (I can't)
« Reply #11 on: April 08, 2008, 03:14:26 AM »

Code: [Select]
amuleweb-WebInterface.o:WebInterface.cpp:(.rdata$_ZTV12CamulewebApp[vtable for CamulewebApp]+0x44): undefined reference to `wxEvtHandler::GetClassInfoW() const'
collect2: ld returned 1 exit status
Fixed.
OK!!! I could compile and run amuleweb on windows XP, I'll test it intensively later :)
Thanks wuischke and GonoszTopi  :D
Logged

Crakem

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 103
Re: Compiling amuleweb on windows (I can't)
« Reply #12 on: April 23, 2008, 05:35:38 PM »

Well, I intensively tested amuleweb and I found a few problems:
1) libgd failed to compile on windowsXP with msys  :'( I don't know if I could do it (have somebody tried to cross-compile it?)
2) so I tested amuleweb without it, and when I load webpage a lot of images (static images in webserver/'template') wont load with page at start in firefox. If I open webpage with iexplorer I found more pictures but I miss statics images (for example: decrease priority)
3) amuleweb report a lot of errors with dinamically generated images (sure!) and changing ShowProgressBar=0 in remote.conf is not taken in account (why?  :'( ) {I want to see error messages but there is difficult with so long log}

I'm using 0404 version of aMule. Thanks for all (and a lot of) replies. Feel free for request test to me.

Edit: redirecting to file I found no errors for static images, I got only error for dynamics ones (like: CFileImage: failed to open c:\<path>\ dyn_<hash>.png)
« Last Edit: April 23, 2008, 05:42:32 PM by Crakem »
Logged

Crakem

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 103
Re: Compiling amuleweb on windows (I can't)
« Reply #13 on: April 23, 2008, 07:58:56 PM »

OK, I have checked libgd website and I found this link (precompiled package)
Code: [Select]
http://www.libgd.org/releases/gd-latest-win32.zipI have downloaded and installed (by hand) in c:\mingw directory (it's different from msys directory in my setup and maybe in all)
Configure script was able to find libgd and amuleweb compilation was successful; I added to amuleweb folder bgd.dll but amuleweb won't show dinamically generated pictures in webpage and I miss a lot of statically generated too. Maybe it need another binaries from gd lib? Running amuleweb didn't request any bins but I saw same errors like missing libgd  :-\

Thanks all for replies
Logged

lfroen

  • Guest
Re: Compiling amuleweb on windows (I can't)
« Reply #14 on: April 23, 2008, 09:21:36 PM »

You need libpng
Logged
Pages: [1] 2