Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
-
- Posts: 4
- Joined: Sun 28. Feb 2016, 14:46
Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
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.
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)
Hi,
please provide the output of the driver build process. With the given information we are not able to help you.
regards
Michael
please provide the output of the driver build process. With the given information we are not able to help you.
regards
Michael
-
- Posts: 4
- Joined: Sun 28. Feb 2016, 14:46
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Hi,
Please find below the error that I am getting while compiling peak-linux-driver :
error: unrecognized command line option '-mgeneral-regs-only'
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)
Hi,
please post the full output with all details.
regards
Michael
please post the full output with all details.
regards
Michael
-
- Posts: 4
- Joined: Sun 28. Feb 2016, 14:46
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Hello Michael,
Please find the snapshot of the error log in the attachment.
Regards,
Abhay
Please find the snapshot of the error log in the attachment.
Regards,
Abhay
- Attachments
-
- PCANError.png (177.77 KiB) Viewed 18219 times
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
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:
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
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
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
-
- Posts: 4
- Joined: Sun 28. Feb 2016, 14:46
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
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
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 (357.41 KiB) Viewed 18202 times
- S.Grosjean
- Software Development
- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
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:
It looks like on this platform, you also have to install these packages:
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
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`
Code: Select all
$ sudo apt-get install build-essential checkinstall
$ sudo apt-get install module-assistant
Code: Select all
$ make -C driver
Stéphane
— Stéphane
Re: Unable to generate pcan.ko on NVIDIA JTX1(64-bit kernel)
Hello all,
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
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
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)
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
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