I use a CCS command-line compiler for PIC programming. I've been using it and upgrading it for over a decade, and I'm comfortable with it. I recently updated to Ubuntu 19.04 64 bit, and now the program fails with a Seg Fault.

All of my other 32-bit software seems to work fine, and CCS support says it should run in 64-bit, but they have provided little other support other than that. They don't even reply other than that one answer.

Is there any way that I can force the program to run using the 32-libs? I'm just assuming that might be the issue.

Any help would be greatly appreciated.

Here are the ldd results:

ldd ccsc.bin  
    linux-gate.so.1 (0xf7fcb000)  
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7f85000)  
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7f7f000)  
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7d9f000)  
    /lib/ld-linux.so.2 (0xf7fcc000)

I have located all of these libraries in '/lib/i386-linux-gnu/' except Linux-gate.so.1'. I attempted sudo apt-get -y install Linux-gate
But it was not found.

Ok, so I learned Linux-gate is a virtual library and certainly not my problem. All dependencies appear to be installed. CCS will provide no help (I guess because I'm the only Linux user with a 64-bit machine) Any help from any of you would be appreciated. I'm converting my code to XC8, but that is a painful process.

  • 3
    Use ldd on the "CCS command-line compiler" to see which libraries it uses. – waltinator Aug 24 at 21:44
  • Thanks Waltinator, – Glenn Aug 25 at 22:13
  • I added the ldd results to my question. – Glenn Aug 25 at 22:20
  • Maybe try limiting the memory seen to 2G. See stackoverflow.com/questions/13484016/… – ubfan1 Nov 30 at 1:01
  • Another fix might be to run a 32 bit virtual machine and do your work there. – ubfan1 Nov 30 at 1:11

It seems that you are missing the x86 compatibility layer. To install it, you need to install some dependencies (IIRC the following):

sudo dpkg --add-architecture i386
sudo apt-get -y install lib32z1 libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5

There may be other libs you'd need to install, but these are probably the most popular.

  • I know I ran the dpkg --add architecture. And I thought I add the needed libs, but it appears 'lib32ncurses5' could not be found. – Glenn Aug 25 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.