USBDM with glibc older than 2.14 on Debian Stable

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USBDM with glibc older than 2.14 on Debian Stable

716 Views
bthomas
Contributor I

I just downloaded the USBDM deb package. It installed cleaning on Debian/Stable (Wheezy). However in trying to run any application I get the following error

HCS08_FlashProgrammer: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by HCS08_FlashProgrammer)

HCS08_FlashProgrammer: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib/x86_64-linux-gnu/usbdm/libusbdm.so.4)

This is because usbdm was compiled with GLIBC 2.14 but Debian Stable only provides GLIBC 2.13. If it were compiled with an older version

version of GLIBC (such as that available on Ubuntu Long Term Stable or Debian Stable) it will execute without problems with the newer

version but not the other way round.

However I am unable to find instructions on how to compile this software on a GNU/Linux system. Is this possible ? Could you please advice ?

At present I only need the HCS08_FlashProgrammer and perphas the Eclipse Plugin.

Sincerely

B Thomas

0 Kudos
Reply
2 Replies

429 Views
bthomas
Contributor I

Hi

Firstly I would like to think PGO for his hard work in providing USBDM for us Linux users.

I did manage to rebuild Debian packages on Debian/Stable. It turned out to be quite easy. There were a few build problems that are easly solved as described below.

NOTE:

1) My build failure fixes are probably short term hacks PGO will probably have better solutions

2) I am building from within the git repository

3) Please help correct any errors or omissions in these instructions

Requirements to build on Debian :

1) GNU G++ (provided by build-essential package)

2) libxcerces-c-dev

3) tcl8.5-dev and tk8.5-dev

4) openjdk-7-jdk

5) libwxgtk2.8-dev

Steps to build (including build failure fixes) :

1) cd usbdm-eclipse-makefiles-build

2) chmod u+x MakeAll CreateDebFile

3) ./MakeAll

4) First build failure :

-- Building ARM_FlashProgrammer/AdvancedPanel.o from ../Shared_V4/src/Programmer/AdvancedPanel.cpp

g++ -fPIC -O3 -g0   -Wall -shared -fvisibility=hidden -fvisibility-inlines-hidden  -DTARGET=ARM -DFLASH_PROGRAMMER -DUSE_ICON   -DuseWxWidgets  -Isrc -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__  -I../Shared_V4/src -I../Shared_V4/src/Programmer -MD -c ../Shared_V4/src/Programmer/AdvancedPanel.cpp -o ARM_FlashProgrammer/AdvancedPanel.o

../Shared_V4/src/Programmer/AdvancedPanel.cpp:55:27: fatal error: USBDMDialogue.h: No such file or directory

compilation terminated.

  Fix :

cd Shared_V4/src/Programmer/ ; git mv UsbdmDialogue.h USBDMDialogue.h ; cd ../../..

./MakeAll

5) Second build failure :

make -C UsbdmJniWrapper_DLL all

make: *** UsbdmJniWrapper_DLL: No such file or directory.  Stop.

   Fix :

git mv UsbdmJniWrapper_dll UsbdmJniWrapper_DLL

./MakeAll

6) Third build failure :

-- Building UsbdmJniWrapper/UsbdmJniWrapper.o from src/UsbdmJniWrapper.cpp

g++ -fPIC -O3 -g0   -Wall -shared -fvisibility=hidden -fvisibility-inlines-hidden      -Isrc -I../Shared_V4/src -I/usr/lib/jvm/default-java/include -MD -c src/UsbdmJniWrapper.cpp -o UsbdmJniWrapper/UsbdmJniWrapper.o

src/UsbdmJniWrapper.cpp:1:17: fatal error: jni.h: No such file or directory

compilation terminated.

  Fix :

  Edit the file Common.mk and add " -I/usr/lib/jvm/java-7-openjdk-amd64/include" to the line (number 246 ) "JAVA_INC := -I/usr/lib/jvm/default-java/include"

  which now reads "JAVA_INC := -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/java-7-openjdk-amd64/include" and continue build with ./MakeAll.

  This problem probably only occurs if you use a non-default openjdk (as I am using java-7) on Debian/Stable.

7) The build should now successfully complete. To build the Debian package do

    ./CreateDebFile

I can confirm that this rebuild fixes all linking issues on Debian/Stable. I have not yet used the built package for flash programming so can not comment on that.

regards

0 Kudos
Reply

429 Views
pgo
Senior Contributor V

Hi B Thomas,

Glad you were able to build the code.  The problem with the wrong case in the file names is caused by me doing most of the work on Windows which ignores case.  I keep on fixing it but then copy a file between linux/windows and clobber it again.  The other thing I hadn't realized is that GIT also remembers the actual case on Windows (I think).  I will see if I can fix this.

bye

0 Kudos
Reply