aMule Forum
English => Compilation problems => Topic started by: michelinok on April 04, 2011, 08:53:00 PM
-
Hi!
I've a strange problem...
Look at this:
export TARGET=arm-linux-gnueabi
export BUILDDIR=/home/michele/Scrivania/amulenew/
./configure --host=arm-linux-gnueabi --with-wx-config=/home/michele/Scrivania/newamule/tmp/bin/wx-config --with-crypto-prefix=/home/michele/Scrivania/newamule/cryptopp --prefix=/home/michele/Scrivania/newamule/tmp --enable-amulecmd --enable-amule-daemon --enable-webserver --disable-alcc --disable-monolithic --enable-optimize --enable-mmap --disable-ed2k --enable-static --disable-amule-gui --disable-upnp --disable-nls --disable-debug --disable-alc --disable-cas --disable-wxcas --with-libpng-prefix=/home/michele/Scrivania/newamule/tmp/ --with-zlib=/home/michele/Scrivania/newamule/tmp
this is the output:
Configure script has finished system check.
Configured aMule SVN (rev. 10517) for 'arm-unknown-linux-gnueabi'.
aMule enabled options:
**** aMule Core ****
Prefix where aMule should be installed? /home/michele/Scrivania/newamule/tmp
Should aMule be compiled with i18n support? no
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? no
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? sources
**** 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? no
**** aMuleLinkCreator ****
Should aMuleLinkCreator GUI version (alc) be built? no
Should aMuleLinkCreator for console (alcc) be built? no
**** 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? no
Libraries aMule will use to build:
wxWidgets 2.8.12 (base,static)
crypto++ 5.6.1 (sources, in /home/michele/Scrivania/newamule/cryptopp)
libpng 1.5.2
zlib 1.2.5
*** Warnings during configuration ***
* Cross-compilation detected, so exception handling cannot be tested.
Note that broken exception handling in your compiler may lead to unexpected
crashes.
* configure cannot check whether malloc() and realloc() are GNU libc
compatible. You have to be ABSOLUTELY sure that they are, otherwise run
configure with the --without-gnu-malloc switch.
* bfd.h not found or unusable, please install binutils development package if
you are a developer or want to help testing aMule
That seems ok...but when, in the next step, i do make install...
.......
Packet.cpp:26:40: error: zlib.h: File o directory non esistente
Packet.cpp: In member function ‘void CPacket::PackPacket()’:
Packet.cpp:251: error: ‘uLongf’ was not declared in this scope
Packet.cpp:251: error: expected `;' before ‘newsize’
Packet.cpp:252: error: ‘newsize’ was not declared in this scope
Packet.cpp:254: error: ‘Z_BEST_COMPRESSION’ was not declared in this scope
Packet.cpp:254: error: ‘compress2’ was not declared in this scope
Packet.cpp:256: error: ‘Z_OK’ was not declared in this scope
Packet.cpp: In member function ‘bool CPacket::UnPackPacket(uint32)’:
Packet.cpp:291: error: ‘uLongf’ was not declared in this scope
Packet.cpp:291: error: expected `;' before ‘unpackedsize’
Packet.cpp:292: error: ‘unpackedsize’ was not declared in this scope
Packet.cpp:292: error: ‘uncompress’ was not declared in this scope
Packet.cpp:294: error: ‘Z_OK’ was not declared in this scope
make[2]: *** [libmuleappcommon_a-Packet.o] Errore 1
make[2]: uscita dalla directory "/home/michele/Scrivania/newamule/amule/src"
make[1]: *** [install-recursive] Errore 1
make[1]: uscita dalla directory "/home/michele/Scrivania/newamule/amule/src"
make: *** [install-recursive] Errore 1
Any idea?
PS: amuleweb is compiled anyway....
-
You need zlib development packages.
-
You need zlib development packages.
I'm using the develoment package...
Libraries aMule will use to build:
wxWidgets 2.8.12 (base,static)
crypto++ 5.6.1 (sources, in /home/michele/Scrivania/newamule/cryptopp)
libpng 1.5.2
zlib 1.2.5
and zlib is found by the ./configure
or am i wrong (atm zlib website is down...cannot check...)
-
I'll try to be more accurate...and sorry for this LONG post...
I'll try to explain as clear as possible the steps i perform to cross compile:
things to take notice:
1) my username is "michele"
2) my desktop (due to my ubuntu language) is called "Scrivania" (instead of Desktop)
3) i'm trying to cross compile for ARM9
Ok... i've prepared on my desktop a folder called "newamule" and inside i've these folders (of course...the sources of the packages!!!)
amule
cryptopp
libpng-1.5.2
tmp
wxWidgets-2.8.12
zlib-1.2.5
So...opened a shell and:
1) within zlib folder:
----------------------------------
CC=arm-linux-gnueabi-gcc ./configure
make
make install prefix=/home/michele/Scrivania/newamule/tmp
2) within libpng:
---------------------------
./configure --host=arm-linux-gnueabi --prefix=/home/michele/Scrivania/newamule/tmp LDFLAGS=-L/home/michele/Scrivania/newamule/tmp/lib CPPFLAGS=-I/home/michele/Scrivania/newamule/tmp/include
make
make install
3) within wxwidgets:
-----------------------------------
export TARGET=arm-linux-gnueabi
export BUILDDIR=/home/michele/Scrivania/newamule/
./configure --host=$TARGET --prefix=$BUILDDIR/tmp --with-libiconv-prefix=$BUILDDIR/tmp --enable-unicode --disable-shared --enable-unicode --without-subdirs --disable-gui --disable-expat --enable-largefile
make
make install
4) within amule:
---------------------------
./configure --host=arm-linux-gnueabi --with-wx-config=/home/michele/Scrivania/newamule/tmp/bin/wx-config --with-crypto-prefix=/home/michele/Scrivania/newamule/cryptopp --prefix=/home/michele/Scrivania/newamule/tmp --enable-amulecmd --enable-amule-daemon --enable-webserver --disable-alcc --disable-monolithic --enable-optimize --enable-mmap --disable-ed2k --enable-static --disable-amule-gui --disable-upnp --disable-nls --disable-debug --disable-alc --disable-cas --disable-wxcas --with-libpng-prefix=/home/michele/Scrivania/newamule/tmp/ --with-zlib=/home/michele/Scrivania/newamule/tmp
make
then when performing make i get the error about zlib (the .confure says it's all ok).
I hope someone can try my config ::) and give me some suggestions...
I'm really going MAD!!!! :-\ :P ??? >:( :o
-
Try to cross-compile zlib in this way:
CC=arm-linux-gnueabi-gcc ./configure --prefix=/home/michele/Scrivania/newamule/tmp
make
make install
(If you don't set prefix in configure , I suspect pkgconfig gets wrong include directories later)
Nothing changed :-[
-
Find in configure.log the lines with zlib checks and post them here.
Attached the file...
-
Paths seem ok:
ZLIB_CPPFLAGS='-I/home/michele/Scrivania/newamule/tmp/include'
ZLIB_LDFLAGS='-L/home/michele/Scrivania/newamule/tmp/lib'
ZLIB_LIBS='-lz'
Can you paste the gcc/g++ command right before the error? So we can see the -I and -L flags.
-
here it is...(i can see only one strangething... a double "/" after /home/michekeScrivania/newamule dunno if it's normal...)
make[4]: uscita dalla directory "/home/michele/Scrivania/newamule/amule/src/webserver"
make[3]: uscita dalla directory "/home/michele/Scrivania/newamule/amule/src/webserver"
make[3]: ingresso nella directory "/home/michele/Scrivania/newamule/amule/src"
: -Pyyip -o IPFilterScanner.cpp ./IPFilterScanner.l;
: -o Scanner.cpp ./Scanner.l; \
echo "// Empty file generated by a flex version unable to create headers" > ./Scanner.h
arm-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I.. -DUSE_WX_EXTENSIONS -I/home/michele/Scrivania/newamule//tmp/lib/wx/include/arm-linux-gnueabi-base-unicode-release-static-2.8 -I/home/michele/Scrivania/newamule//tmp/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DwxUSE_GUI=0 -DwxUSE_GUI=0 -I./libs -I./include -D__WEAK_CRYPTO__ -W -Wall -Wshadow -Wundef -O2 -MT libmuleappcore_a-Parser.o -MD -MP -MF .deps/libmuleappcore_a-Parser.Tpo -c -o libmuleappcore_a-Parser.o `test -f 'Parser.cpp' || echo './'`Parser.cpp
Parser.cpp:199:6: warning: "YYENABLE_NLS" is not defined
Parser.cpp:613:6: warning: "YYLTYPE_IS_TRIVIAL" is not defined
mv -f .deps/libmuleappcore_a-Parser.Tpo .deps/libmuleappcore_a-Parser.Po
rm -f libmuleappcore.a
arm-linux-gnueabi-ar cru libmuleappcore.a libmuleappcore_a-AsyncDNS.o libmuleappcore_a-DeadSourceList.o libmuleappcore_a-FileArea.o libmuleappcore_a-FileAutoClose.o libmuleappcore_a-IPFilterScanner.o libmuleappcore_a-Scanner.o libmuleappcore_a-Parser.o libmuleappcore_a-PlatformSpecific.o libmuleappcore_a-RandomFunctions.o libmuleappcore_a-RC4Encrypt.o libmuleappcore_a-StateMachine.o libmuleappcore_a-TerminationProcessAmuleweb.o libmuleappcore_a-ThreadScheduler.o libmuleappcore_a-UPnPBase.o libmuleappcore_a-Entry.o libmuleappcore_a-SearchManager.o libmuleappcore_a-RoutingBin.o libmuleappcore_a-UInt128.o
arm-linux-gnueabi-ranlib libmuleappcore.a
arm-linux-gnueabi-g++ -DHAVE_CONFIG_H -I. -I.. -DUSE_WX_EXTENSIONS -I/home/michele/Scrivania/newamule//tmp/lib/wx/include/arm-linux-gnueabi-base-unicode-release-static-2.8 -I/home/michele/Scrivania/newamule//tmp/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DwxUSE_GUI=0 -DwxUSE_GUI=0 -I./libs -I./include -D__WEAK_CRYPTO__ -W -Wall -Wshadow -Wundef -O2 -MT libmuleappcommon_a-Packet.o -MD -MP -MF .deps/libmuleappcommon_a-Packet.Tpo -c -o libmuleappcommon_a-Packet.o `test -f 'Packet.cpp' || echo './'`Packet.cpp
Packet.cpp:26:40: error: zlib.h: File o directory non esistente
Packet.cpp: In member function ‘void CPacket::PackPacket()’:
Packet.cpp:251: error: ‘uLongf’ was not declared in this scope
Packet.cpp:251: error: expected `;' before ‘newsize’
Packet.cpp:252: error: ‘newsize’ was not declared in this scope
Packet.cpp:254: error: ‘Z_BEST_COMPRESSION’ was not declared in this scope
Packet.cpp:254: error: ‘compress2’ was not declared in this scope
Packet.cpp:256: error: ‘Z_OK’ was not declared in this scope
Packet.cpp: In member function ‘bool CPacket::UnPackPacket(uint32)’:
Packet.cpp:291: error: ‘uLongf’ was not declared in this scope
Packet.cpp:291: error: expected `;' before ‘unpackedsize’
Packet.cpp:292: error: ‘unpackedsize’ was not declared in this scope
Packet.cpp:292: error: ‘uncompress’ was not declared in this scope
Packet.cpp:294: error: ‘Z_OK’ was not declared in this scope
make[3]: *** [libmuleappcommon_a-Packet.o] Errore 1
make[3]: uscita dalla directory "/home/michele/Scrivania/newamule/amule/src"
make[2]: *** [all-recursive] Errore 1
make[2]: uscita dalla directory "/home/michele/Scrivania/newamule/amule/src"
make[1]: *** [all-recursive] Errore 1
make[1]: uscita dalla directory "/home/michele/Scrivania/newamule/amule"
make: *** [all] Errore 2
michele@michele-desktop:~/Scrivania/newamule/amule$
-
We could conceivably have forgotten about those flags.
-
That's odd, I don't see zlib include path.
Set, before running configure,
export CPPFLAGS="-I/home/michele/Scrivania/newamule/tmp/include"
good...it goes on...but it stop when it cannot find libcrypto.a and i've no idea on how to cross compile crypto++, i've not found any tutorial on how to do this step.
If someone know how to do it, please, let me know.
I'll try to investigate, but afaik when (some months ago) i successfully cross compiled amule i remember that i didn't cross compile crypto++ ??? ???
-
As you can see from the output of ./configure
Crypto++ library/headers style? sources
Any ideas? ???
-
afaik when (some months ago) i successfully cross compiled amule i remember that i didn't cross compile crypto++ ??? ???
You should have.
-
Cross-compiling crypto++ is a nightmare.
I'm sending you a PM.
No noghtmare at all...i've to just modify the GNUmakefile and remove the flag "-march=native" and set the CXX=my compiler.
Anyone know how to avoid the editing of GNUmakefile and remove the CPPFLAG "-march=native" ?