aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Stuck with libz.a cross-compiling...  (Read 6068 times)

michelinok

  • Jr. Member
  • **
  • Karma: 2
  • Offline Offline
  • Posts: 92
Stuck with libz.a cross-compiling...
« on: October 04, 2010, 08:57:19 PM »

Hi!
I'm trying to crosscompile amule for linux-arm, and i started following the guide on the wiki.
The problem is in the first package "zlib"...
Once i perform "make" it stops at the end with the following error:

....
....
arm-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o zutil.o zutil.c
arm-linux-gnueabi-ar rc rc libz.a adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
arm-linux-gnueabi-ar: libz.a: No such file or directory
make: *** [libz.a] Error 1


Any idea on why i get the error abot libz.a ?  The compilation process goes ok until the "make".

Many thanks to all !
Logged
------------------------------------------------------------------
Pump up my karma :P, i'm running amule on an ARM9!
------------------------------------------------------------------

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Stuck with libz.a cross-compiling...
« Reply #1 on: October 04, 2010, 09:02:32 PM »

There are two "rc" passed to the archiver. The first is the command. The second is taken wrongly as the lib to be created, and thus the lib as input.  :)
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

michelinok

  • Jr. Member
  • **
  • Karma: 2
  • Offline Offline
  • Posts: 92
Re: Stuck with libz.a cross-compiling...
« Reply #2 on: October 05, 2010, 07:37:09 PM »

Ok,your suggestion worked ok, but now i'm stuck with the installation of gettext...
It goes ok until make install:

......
......
.....
In file included from mbchar.h:157,
                 from mbchar.c:21:
/usr/arm-linux-gnueabi/include/wctype.h:112: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:118: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:121: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:125: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:129: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:134: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:137: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:142: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:147: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:152: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:157: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:163: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:176: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:195: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘towlower’
/usr/arm-linux-gnueabi/include/wctype.h:198: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘towupper’
/usr/arm-linux-gnueabi/include/wctype.h:222: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘towctrans’
/usr/arm-linux-gnueabi/include/wctype.h:231: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:237: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:240: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:244: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:248: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:253: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:256: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:261: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:266: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:271: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:276: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:281: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:290: error: expected ‘)’ before ‘__wc’
/usr/arm-linux-gnueabi/include/wctype.h:299: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘towlower_l’
/usr/arm-linux-gnueabi/include/wctype.h:302: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘towupper_l’
/usr/arm-linux-gnueabi/include/wctype.h:310: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘towctrans_l’
In file included from mbchar.c:21:
mbchar.h:239: error: expected ‘)’ before ‘wc’
make[3]: *** [mbchar.o] Errore 1
make[3]: uscita dalla directory «/home/michele/Scrivania/build/gettext-0.17/gettext-runtime/gnulib-lib»
make[2]: *** [install] Errore 2
make[2]: uscita dalla directory «/home/michele/Scrivania/build/gettext-0.17/gettext-runtime/gnulib-lib»
make[1]: *** [install-recursive] Errore 1
make[1]: uscita dalla directory «/home/michele/Scrivania/build/gettext-0.17/gettext-runtime»
make: *** [install-recursive] Errore 1


Any idea?

PS: When i'll finish compiling amule, i'll write a tutorial about arm9  :P
Logged
------------------------------------------------------------------
Pump up my karma :P, i'm running amule on an ARM9!
------------------------------------------------------------------

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Stuck with libz.a cross-compiling...
« Reply #3 on: October 05, 2010, 08:34:00 PM »

Try to configure aMule with --disable-nls , then you don't need gettext.
For cross compiling start with as little extra dependencies as possible. When you get it working you can still try to extend it.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

michelinok

  • Jr. Member
  • **
  • Karma: 2
  • Offline Offline
  • Posts: 92
Re: Stuck with libz.a cross-compiling...
« Reply #4 on: October 06, 2010, 12:15:44 PM »

Try to configure aMule with --disable-nls , then you don't need gettext.
For cross compiling start with as little extra dependencies as possible. When you get it working you can still try to extend it.

Ok, i'll try this morning skippinggettext, but what about wxwidgets? Isthere a way to tell amule to not use wxwidgets? I've tryed compiling wxwidgets, but i'm stuck when it check for gtk+...and have no idea how to cross compile gtk .

Many thanks in advantage!
Logged
------------------------------------------------------------------
Pump up my karma :P, i'm running amule on an ARM9!
------------------------------------------------------------------

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Stuck with libz.a cross-compiling...
« Reply #5 on: October 06, 2010, 10:15:27 PM »

No way to build aMule without wx.
But for embedded you only want to build amuled. So it is enough to build wxbase only (without GTK). configure wx with --enable-unicode --without-subdirs --disable-gui --disable-expat
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

michelinok

  • Jr. Member
  • **
  • Karma: 2
  • Offline Offline
  • Posts: 92
Re: Stuck with libz.a cross-compiling...
« Reply #6 on: October 07, 2010, 09:23:21 PM »

Now with:

./configure --host=$TARGET --with-zlib=$BUILDDIR/tmp --with-wx-prefix=$BUILDDIR/tmp --with-wx-config=$BUILDDIR/tmp/bin/wx-config --with-crypto-prefix=$BUILDDIR/tmp --prefix=$BUILDDIR/tmp --enable-amulecmd --enable-amule-daemon --enable-webserver --enable-alcc --disable-monolithic --enable-optimize --enable-mmap --disable-ed2k --disable-amule-gui --disable-upnp --disable-nls  --disable-debug --with-libpng-prefix=/home/michele/Scrivania/build/tmp/



Configure script has finished system check.

  Configured aMule SVN (rev. 10306) for 'arm-unknown-linux-gnueabi'.

  aMule enabled options:

  **** aMule Core ****
  Prefix where aMule should be installed?                    /home/michele/Scrivania/build//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? (EXPERIMENTAL)           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?                  no

  **** 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?                          no
  Libraries aMule will use to build:
                                       wxWidgets             2.8.10 (base,static)
                                       crypto++              5.6.0 (installed, in /home/michele/Scrivania/build//tmp)
                                       libpng                1.4.4
                                       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






Ok...seems ok, then i performed "make install" and took 2 minutes (on a quad core  ;D)

Now...how can i install the entire package to my board? Is there a way to copy the right files,etc.. to a folder?
« Last Edit: October 07, 2010, 09:35:44 PM by michelinok »
Logged
------------------------------------------------------------------
Pump up my karma :P, i'm running amule on an ARM9!
------------------------------------------------------------------

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Stuck with libz.a cross-compiling...
« Reply #7 on: October 07, 2010, 11:13:31 PM »

Yeah, quad cores rock (but only when you pass -j4 to make).
For starters, just copy amuled to wherever you want it. When you run it it will create a config file in ~/.amule which you can edit. Then  get a matching amulegui for your host platform and you're ready to rumble.  :)
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

michelinok

  • Jr. Member
  • **
  • Karma: 2
  • Offline Offline
  • Posts: 92
Re: Stuck with libz.a cross-compiling...
« Reply #8 on: October 08, 2010, 08:18:38 AM »

Yeah, quad cores rock (but only when you pass -j4 to make).
For starters, just copy amuled to wherever you want it. When you run it it will create a config file in ~/.amule which you can edit. Then  get a matching amulegui for your host platform and you're ready to rumble.  :)

Not so easy...ehwn i start (for example) amuleweb, it asks for libpng.so.4 (or a similar file, i'm not on the machine running linux atm), am i missing something about libraries? should i link them statically? (if so,how?).

Thanks!

Your help is great!
Logged
------------------------------------------------------------------
Pump up my karma :P, i'm running amule on an ARM9!
------------------------------------------------------------------

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Stuck with libz.a cross-compiling...
« Reply #9 on: October 08, 2010, 06:23:28 PM »

First, I suggest amulegui instead of amuleweb.
Second, if you really want it you can still run amuleweb on your main PC instead of your embedded environment.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon