The C Source, Patches and (shudder!) Bugs
Post Reply
sentient
Posts: 1
Joined: 21 Feb 2013, 20:55

Crosscompiling source for the ARM

Post by sentient » 21 Feb 2013, 21:36

First of all: thanks for putting all this knowledge and code together. It has been very helpful.
I have a bit of a challenge. I'm trying to make the latest usb-modeswitch available for the ARM prcocessor.

On the main page http://draisberghof.de/usb_modeswitch/ there is a static binary for ARM (version 1.1.9), but I like to update this to the latest version 1.2.5.
I'm not sure how this static package was created and/or if there a script that is available to create this static library.

I have tried various things :
* I tried to build the library via buildroot http://buildroot.uclibc.org/ . It compiled as a dynamic library. But not as a static library.
(Build options \ prefer static libraries )

* I tried to modify the install script to use the toolchain GCC compiler. arm-none-linux-gnueabi-gcc. But it 'complaints' on not finding usb.h file .
Note: I was able to cross compile the libusb-1.0.9.

Code: Select all

make install-static
./make_static_dispatcher.sh

------
Note: found a Tcl shell on your system; embedded interpreter not essential.
Recommending default installation with "make install" ...


Compiling the usb_modeswitch dispatcher ...
./jim/libjim.a(jim-load.o): In function `JimFreeOneLoadHandle':
/home/user/Downloads/usb-modeswitch/usb-modeswitch-1.2.5/jim/jim-load.c:86: undefined reference to `dlclose'
./jim/libjim.a(jim-load.o): In function `Jim_LoadLibrary':
/home/user/Downloads/usb-modeswitch/usb-modeswitch-1.2.5/jim/jim-load.c:29: undefined reference to `dlopen'
/home/user/Downloads/usb-modeswitch/usb-modeswitch-1.2.5/jim/jim-load.c:61: undefined reference to `dlsym'
/home/user/Downloads/usb-modeswitch/usb-modeswitch-1.2.5/jim/jim-load.c:79: undefined reference to `dlclose'
/home/user/Downloads/usb-modeswitch/usb-modeswitch-1.2.5/jim/jim-load.c:31: undefined reference to `dlerror'
collect2: ld returned 1 exit status
strip: 'usb_modeswitch_dispatcher': No such file
Done!
arm-none-linux-gnueabi-gcc -o usb_modeswitch usb_modeswitch.c -Wall -l usb  
usb_modeswitch.c:58:17: fatal error: [b]usb.h[/b]: No such file or directory
compilation terminated.
make: *** [usb_modeswitch] Error 1

So my main question is how was the static ARM library created. And would that still work with the 1.2.5 version?

I'm using the CodeSourcery/Sourcery_G++_Lite toolchain.


Regards,

Marco

Post Reply