Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

This forum covers PCAN-Linux and Linux development issues concerning our products
abhay.sorte
Posts: 4
Joined: Sun 28. Feb 2016, 14:46

Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by abhay.sorte » Mon 29. Feb 2016, 08:09

Hello All,

I am using PCAN-USB device and trying to install peak Linux driver(peak-linux-driver-7.15.2) on NVIDIA Jetson TX1 platform which has ubuntu 14.04. But while compiling the driver, I get error and pcan.ko is not generated.

Earlier I tried PCAN-USB with NVIDIA Jetson TK1 platform and I was able to compile the peak linux driver and generate pcan.ko.

The only difference between these two platforms is that on Jetson TK1, kernel is 32-bit and on Jetson TX1, kernel is 64-bit. So my doubt on this is, what are the steps I need to follow to generate pcan.ko for 64-bit kernel.

Any inputs is highly appreciated.

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by M.Maidhof » Mon 29. Feb 2016, 12:49

Hi,

please provide the output of the driver build process. With the given information we are not able to help you.

regards

Michael

abhay.sorte
Posts: 4
Joined: Sun 28. Feb 2016, 14:46

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by abhay.sorte » Tue 1. Mar 2016, 16:31

Hi,

Please find below the error that I am getting while compiling peak-linux-driver :

error: unrecognized command line option '-mgeneral-regs-only'

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by M.Maidhof » Wed 2. Mar 2016, 09:25

Hi,

please post the full output with all details.

regards

Michael

abhay.sorte
Posts: 4
Joined: Sun 28. Feb 2016, 14:46

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by abhay.sorte » Thu 3. Mar 2016, 08:08

Hello Michael,

Please find the snapshot of the error log in the attachment.

Regards,
Abhay
Attachments
PCANError.png
PCANError.png (177.77 KiB) Viewed 18219 times

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by S.Grosjean » Thu 3. Mar 2016, 11:30

Hello Abhay,

This is a known issue with gcc 4.8 vs. the Jetson aarch64 arch. The '-mgeneral-regs-only" is a aarch64 specific option.

It looks like you're not cross-compiling the driver so please try the following commands, to install a proper arch toolchain:

Code: Select all

sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install libc6:arm64 binutils:arm64 cpp-4.8:arm64 gcc-4.8:arm64
Then retry to compile the driver...

Another fix is to cross-compile the driver, with installing (yes, on any other host) this toolchain: http://releases.linaro.org/14.04/compon ... nux.tar.xz

Finally, you could also try to install a more recent gcc version...

Anyway, donot hesitate to give us any feedback about this issue.

Regards,

Stéphane
— Stéphane

abhay.sorte
Posts: 4
Joined: Sun 28. Feb 2016, 14:46

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by abhay.sorte » Thu 3. Mar 2016, 17:36

Hello Michael,

I tried the below steps:


Code: Select all
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install libc6:arm64 binutils:arm64 cpp-4.8:arm64 gcc-4.8:arm64


still I am not able to compile the peak driver.
Error log is attached.

Regards,
Abhay
Attachments
screenshot.png
screenshot.png (357.41 KiB) Viewed 18202 times

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by S.Grosjean » Mon 7. Mar 2016, 10:11

Hi!

So we made some progress since the initial compiler issue seems fixed now.

Now it looks like we're facing another one: it seems that your Kernel (header) config is not well setup, if one believes the "syntax error" in fixdep.

Please, redo:

Code: Select all

$ sudo apt-get install --reinstall linux-headers-`uname -r`
It looks like on this platform, you also have to install these packages:

Code: Select all

$ sudo apt-get install build-essential checkinstall
$ sudo apt-get install module-assistant
To eliminate any other noise with trying to build the pcan libs and applications, let's try first to build the driver only, that is, instead of "make", type:

Code: Select all

$ make -C driver
Regards,

Stéphane
— Stéphane

martin
Posts: 1
Joined: Wed 6. Apr 2016, 15:01

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by martin » Wed 6. Apr 2016, 15:09

Hello all,

Code: Select all

sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install libc6:arm64 binutils:arm64 cpp-4.8:arm64 gcc-4.8:arm64
The proposed solution (above) to install a new toolchain on the TX1 would remove the old gcc and also CUDA. Is it possible to install the toolchain without uninstalling other packages? I don't want my CUDA installation to be affected.

Alternatively, if someone already compiled the pcan libraries for TX1 would you mind sharing the binaries?

Best regards,

Martin

dwyer2bp
Posts: 6
Joined: Fri 30. Sep 2016, 22:18

Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)

Post by dwyer2bp » Fri 30. Sep 2016, 22:34

Hi,

Yes going through suggestions from S.Grosjean, this will wipe out important links and other dependencies you may have if you do on your system. This sort of ruined my compiled point-cloud-library connections to CUDA, which now I have to either fix or re-compile PCL again...just another 6 hours to compile :/

Now, even though this suggestion caused problems I went ahead and pushed through to see if I could just get the binaries for pcan drivers compiled so I'd have em, but still there were errors (my compiler never seemed to get past the issue of '-mgeneral-regs-only'.

Any ideas? I see this thread went stale, I'm hoping to bring it back.

Thx

Post Reply