Page 1 of 2
Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Mon 29. Feb 2016, 08:09
by abhay.sorte
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.
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Mon 29. Feb 2016, 12:49
by M.Maidhof
Hi,
please provide the output of the driver build process. With the given information we are not able to help you.
regards
Michael
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Tue 1. Mar 2016, 16:31
by abhay.sorte
Hi,
Please find below the error that I am getting while compiling peak-linux-driver :
error: unrecognized command line option '-mgeneral-regs-only'
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Wed 2. Mar 2016, 09:25
by M.Maidhof
Hi,
please post the full output with all details.
regards
Michael
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Thu 3. Mar 2016, 08:08
by abhay.sorte
Hello Michael,
Please find the snapshot of the error log in the attachment.
Regards,
Abhay
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Thu 3. Mar 2016, 11:30
by S.Grosjean
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
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Thu 3. Mar 2016, 17:36
by abhay.sorte
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
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Mon 7. Mar 2016, 10:11
by S.Grosjean
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:
Regards,
Stéphane
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Wed 6. Apr 2016, 15:09
by martin
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
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Posted: Fri 30. Sep 2016, 22:34
by dwyer2bp
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