Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #242646 > unrolled thread
| Started by | Hans <hans.ullrich@loop.de> |
|---|---|
| First post | 2021-12-03 14:00 +0100 |
| Last post | 2021-12-03 19:40 +0100 |
| Articles | 6 — 4 participants |
Back to article view | Back to linux.debian.user
How to force compilerversion Hans <hans.ullrich@loop.de> - 2021-12-03 14:00 +0100
Re: How to force compilerversion The Wanderer <wanderer@fastmail.fm> - 2021-12-03 14:10 +0100
Re: How to force compilerversion Hans <hans.ullrich@loop.de> - 2021-12-03 14:20 +0100
Re: How to force compilerversion Christian Britz <cbritz@t-online.de> - 2021-12-03 14:30 +0100
Re: How to force compilerversion Hans <hans.ullrich@loop.de> - 2021-12-03 19:20 +0100
Re: How to force compilerversion "Andrew M.A. Cater" <amacater@einval.com> - 2021-12-03 19:40 +0100
| From | Hans <hans.ullrich@loop.de> |
|---|---|
| Date | 2021-12-03 14:00 +0100 |
| Subject | How to force compilerversion |
| Message-ID | <Dqgkq-49k-3@gated-at.bofh.it> |
Hi folks, for kali-linux I need to build a kernel-module (it is the nvidia kernel module). Make module does not work, as it says, kernel is build with gcc-10 and installed is gcc-11. Setting IGNORE_CC_MISMATCH is set to 1 (which is default). How can I set the environment, to use the older gcc version once, without deinstalling gcc-11 or killing my whole system? Best regards Hans
[toc] | [next] | [standalone]
| From | The Wanderer <wanderer@fastmail.fm> |
|---|---|
| Date | 2021-12-03 14:10 +0100 |
| Message-ID | <Dqgu5-4rU-3@gated-at.bofh.it> |
| In reply to | #242646 |
[Multipart message — attachments visible in raw view] — view raw
On 2021-12-03 at 07:52, Hans wrote: > Hi folks, > > for kali-linux I need to build a kernel-module (it is the nvidia > kernel module). Note that this is not Debian, so is not strictly on-topic for this mailing list. However, at least at a glance it doesn't look like there's anything distro-specific about the question. > Make module does not work, as it says, kernel is build with gcc-10 > and installed is gcc-11. > > Setting IGNORE_CC_MISMATCH is set to 1 (which is default). > > How can I set the environment, to use the older gcc version once, > without deinstalling gcc-11 or killing my whole system? The details will vary depending on the build system of the module, including both the build tools used and the exact details of how this particular codebase is configured to build. I haven't touched, or looked at, the NVIDIA kernel module in long enough that I don't know the specifics for that exact case. However, the short version that should work for most cases is: * Make sure that you actually have gcc-10 installed. * At build time, specify the C compiler as being GCC 10, rather than the system default C compiler. (And possibly do the same for other compilation tools - the C preprocessor, the C++ compiler, the linker, the assembler, ...) In the type of build system that used to be most common - and might still be, for all I know - this latter could be done by specifying environment variables at the start of the build command line; for example, 'CC=gcc-10 .\configure' or 'CC=gcc-10 make'. (Other tools can be specified with variable names such as CPP, CXX, et cetera.) In some cases, however, you might have to use a more advanced method to specify what compiler to use. In some cases - and the NVIDIA kernel module might be one of them - the build system might be complicated enough that you would need to pass special, domain-specific arguments to the configure script or its equivalent; in order to find out what syntax you'd need to use there, we'd need to examine the build system itself and find out what its interfaces look like. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
[toc] | [prev] | [next] | [standalone]
| From | Hans <hans.ullrich@loop.de> |
|---|---|
| Date | 2021-12-03 14:20 +0100 |
| Message-ID | <DqgDM-4uS-9@gated-at.bofh.it> |
| In reply to | #242647 |
Am Freitag, 3. Dezember 2021, 14:03:26 CET schrieb The Wanderer: Thanks for the response. Kali is more than 95 percent debian. However, I will try as you told, if it does not work, please allow me to ask again. Thanks and best regards Hans > On 2021-12-03 at 07:52, Hans wrote: > > Hi folks, > > > > for kali-linux I need to build a kernel-module (it is the nvidia > > kernel module). > > Note that this is not Debian, so is not strictly on-topic for this > mailing list. However, at least at a glance it doesn't look like there's > anything distro-specific about the question. > > > Make module does not work, as it says, kernel is build with gcc-10 > > and installed is gcc-11. > > > > Setting IGNORE_CC_MISMATCH is set to 1 (which is default). > > > > How can I set the environment, to use the older gcc version once, > > without deinstalling gcc-11 or killing my whole system? > > The details will vary depending on the build system of the module, > including both the build tools used and the exact details of how this > particular codebase is configured to build. I haven't touched, or looked > at, the NVIDIA kernel module in long enough that I don't know the > specifics for that exact case. > > However, the short version that should work for most cases is: > > * Make sure that you actually have gcc-10 installed. > > * At build time, specify the C compiler as being GCC 10, rather than the > system default C compiler. (And possibly do the same for other > compilation tools - the C preprocessor, the C++ compiler, the linker, > the assembler, ...) > > In the type of build system that used to be most common - and might > still be, for all I know - this latter could be done by specifying > environment variables at the start of the build command line; for > example, 'CC=gcc-10 .\configure' or 'CC=gcc-10 make'. (Other tools can > be specified with variable names such as CPP, CXX, et cetera.) > > In some cases, however, you might have to use a more advanced method to > specify what compiler to use. In some cases - and the NVIDIA kernel > module might be one of them - the build system might be complicated > enough that you would need to pass special, domain-specific arguments to > the configure script or its equivalent; in order to find out what syntax > you'd need to use there, we'd need to examine the build system itself > and find out what its interfaces look like.
[toc] | [prev] | [next] | [standalone]
| From | Christian Britz <cbritz@t-online.de> |
|---|---|
| Date | 2021-12-03 14:30 +0100 |
| Message-ID | <DqgNs-4xW-7@gated-at.bofh.it> |
| In reply to | #242646 |
Hello Hans, Hans wrote: > Hi folks, > > for kali-linux I need to build a kernel-module (it is the nvidia kernel > module). > > Make module does not work, as it says, kernel is build with gcc-10 and > installed is gcc-11. > > Setting IGNORE_CC_MISMATCH is set to 1 (which is default). > > How can I set the environment, to use the older gcc version once, without > deinstalling gcc-11 or killing my whole system? Kali is not Debian, but CC=/usr/bin/gcc-10 sh nvidia-installer as root should work, assuming that you have GCC 10 installed. You should consider using the nvidia driver package of Kali, if one exists. You should also consider using Debian. :-)
[toc] | [prev] | [next] | [standalone]
| From | Hans <hans.ullrich@loop.de> |
|---|---|
| Date | 2021-12-03 19:20 +0100 |
| Message-ID | <Dqlk6-7gF-5@gated-at.bofh.it> |
| In reply to | #242651 |
Am Freitag, 3. Dezember 2021, 14:20:14 CET schrieb Christian Britz: Hi Christian, yes, but kali is 99 percent debian, as you know. However, tried to build with CC=gcc-10, which is starting but not building. I believe, I have to download the nvidia installer, building from source does not work. There are still other problems. However, I reverted to nouveau at the moment. Kali is my pentestbox, so I can not really use debian for it. On my other computers debian is running - of course! :) Have fun! Best Hans > Hello Hans, > > Hans wrote: > > Hi folks, > > > > for kali-linux I need to build a kernel-module (it is the nvidia kernel > > module). > > > > Make module does not work, as it says, kernel is build with gcc-10 and > > installed is gcc-11. > > > > Setting IGNORE_CC_MISMATCH is set to 1 (which is default). > > > > How can I set the environment, to use the older gcc version once, without > > deinstalling gcc-11 or killing my whole system? > > Kali is not Debian, but CC=/usr/bin/gcc-10 sh nvidia-installer as root > should work, assuming that you have GCC 10 installed. > > You should consider using the nvidia driver package of Kali, if one exists. > > You should also consider using Debian. :-)
[toc] | [prev] | [next] | [standalone]
| From | "Andrew M.A. Cater" <amacater@einval.com> |
|---|---|
| Date | 2021-12-03 19:40 +0100 |
| Message-ID | <DqlDr-7mL-13@gated-at.bofh.it> |
| In reply to | #242657 |
On Fri, Dec 03, 2021 at 07:14:31PM +0100, Hans wrote: > Am Freitag, 3. Dezember 2021, 14:20:14 CET schrieb Christian Britz: > Hi Christian, > > yes, but kali is 99 percent debian, as you know. However, tried to build with > CC=gcc-10, which is starting but not building. > > I believe, I have to download the nvidia installer, building from source does > not work. There are still other problems. However, I reverted to nouveau at > the moment. > Kali is "rolling Debian testing" as well, effectively so you might want to ask how others have done it on a Kali channel. On Debian, I find it easier to _only_ install something in text mode with no X, then install the prereqs for nvidia, build the binary, and only then install X - avoiding nouveau altogether I don't know if you can do this on Kali. All best, Andy C. > Kali is my pentestbox, so I can not really use debian for it. > > On my other computers debian is running - of course! :) > > Have fun! > > Best > > Hans > > > Hello Hans, > > > > Hans wrote: > > > Hi folks, > > > > > > for kali-linux I need to build a kernel-module (it is the nvidia kernel > > > module). > > > > > > Make module does not work, as it says, kernel is build with gcc-10 and > > > installed is gcc-11. > > > > > > Setting IGNORE_CC_MISMATCH is set to 1 (which is default). > > > > > > How can I set the environment, to use the older gcc version once, without > > > deinstalling gcc-11 or killing my whole system? > > > > Kali is not Debian, but CC=/usr/bin/gcc-10 sh nvidia-installer as root > > should work, assuming that you have GCC 10 installed. > > > > You should consider using the nvidia driver package of Kali, if one exists. > > > > You should also consider using Debian. :-) > > > >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web