You are not logged in.

#1 2022-07-04 02:31:30

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

the version of gcc doesn't change

Recently I use the vmware-workststion to resolve some files, but I find after upgrading the vmware-workstation can't work any more. I find the reason is dkms can't install some thing, the wrong is :
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (GCC) 12.1.0
  You are using:           gcc (GCC) 11.3.0
  CC [M]  /var/lib/dkms/vmware-workstation/16.2.3_19376536/build/vmmon-only/linux/driver.o
  CC [M]  /var/lib/dkms/vmware-workstation/16.2.3_19376536/build/vmmon-only/linux/driverLog.o
  CC [M]  /var/lib/dkms/vmware-workstation/16.2.3_19376536/build/vmmon-only/linux/hostif.o
  CC [M]  /var/lib/dkms/vmware-workstation/16.2.3_19376536/build/vmmon-only/common/apic.o
  CC [M]  /var/lib/dkms/vmware-workstation/16.2.3_19376536/build/vmmon-only/common/comport.o
  CC [M]  /var/lib/dkms/vmware-workstation/16.2.3_19376536/build/vmmon-only/common/cpuid.o
  CC [M]  /var/lib/dkms/vmware-workstation/16.2.3_19376536/build/vmmon-only/common/crosspage.o
gcc: error:unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
gcc: error:unrecognized command-line option ‘-ftrivial-auto-var-init=zero’

I have find the wrong is gcc 12 new increase the -ftrivial-auto-var-init=zero,my arch still use 11.3. that is my gcc-v shows:

使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/lto-wrapper
目标:x86_64-pc-linux-gnu
配置为:/build/gcc11/src/gcc/configure --enable-languages=c,c++,fortran,lto --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror --with-build-config=bootstrap-lto --enable-link-serialization=1 --program-suffix=-11 --enable-version-specific-runtime-libs --disable-multilib
线程模型:posix
Supported LTO compression algorithms: zlib zstd
gcc 版本 11.3.0 (GCC)

I don't know how to change it, I can't find any issue about it

this is my first time to submit, if there is wrong , i am sorry

Offline

#2 2022-07-04 02:55:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: the version of gcc doesn't change

Update your system.  Gcc 12.1.0 has been in the repos for over a month and a half:

pacman -Syu

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2022-07-04 04:38:47

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

Trilby wrote:

Update your system.  Gcc 12.1.0 has been in the repos for over a month and a half:

pacman -Syu

I had do it, but I doesn't work.

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 archlinuxcn is up to date
:: Starting full system upgrade...
 there is nothing to do

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc11/src/gcc/configure --enable-languages=c,c++,fortran,lto --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror --with-build-config=bootstrap-lto --enable-link-serialization=1 --program-suffix=-11 --enable-version-specific-runtime-libs --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (GCC)

Last edited by GSTortoise (2022-07-04 05:09:43)

Offline

#4 2022-07-04 04:43:19

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: the version of gcc doesn't change

Use code tags and paste in English:
https://wiki.archlinux.org/title/Genera … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2022-07-04 04:46:45

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

jasonwryan wrote:

sorry I correct it

Offline

#6 2022-07-04 04:48:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: the version of gcc doesn't change

jasonwryan wrote:

Use code tags...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2022-07-04 05:01:19

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: the version of gcc doesn't change

What does `env` give you?

Offline

#8 2022-07-04 05:01:57

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

jasonwryan wrote:
jasonwryan wrote:

Use code tags...

Oh sorry I have some question to solve it

Offline

#9 2022-07-04 05:05:26

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

Scimmia wrote:

What does `env` give you?

maybe can you tell me how to print the 'env'?

Offline

#10 2022-07-04 05:07:54

Adriik
Member
From: Argentina
Registered: 2022-03-10
Posts: 134
Website

Re: the version of gcc doesn't change

In a terminal run env

And post it using [ code ] text [/ code ] (without spaces)


I'm just someone. Please use [code] [/code] tags.

Offline

#11 2022-07-04 05:10:55

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

Adriik wrote:

In a terminal run env

And post it using [ code ] text [/ code ] (without spaces)

Oh~ thanks
that is show

COLORFGBG=15;0
COLORTERM=truecolor
CUDA_PATH=/opt/cuda
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=plasma
DISPLAY=:0
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/tortoise/.gtkrc-2.0:/home/tortoise/.config/gtkrc-2.0
GTK_IM_MODULE=fcitx
GTK_MODULES=canberra-gtk-module
GTK_RC_FILES=/etc/gtk/gtkrc:/home/tortoise/.gtkrc:/home/tortoise/.config/gtkrc
HOME=/home/tortoise
INVOCATION_ID=5297aef36a8f458a9caa7e6f6c36b19b
JOURNAL_STREAM=8:18334
KDE_APPLICATIONS_AS_SCOPE=1
KDE_FULL_SESSION=true
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=5
KONSOLE_DBUS_SERVICE=:1.46
KONSOLE_DBUS_SESSION=/Sessions/2
KONSOLE_VERSION=220402
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:en_US
LOGNAME=tortoise
MAIL=/var/spool/mail/tortoise
MANAGERPID=1069
MOTD_SHOWN=pam
OLDPWD=/home/tortoise
PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket
PATH=/home/tortoise/miniconda3/condabin:/opt/cuda/bin:/home/tortoise/miniconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
PROFILEHOME=
PWD=/home/tortoise
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_IM_MODULE=fcitx
SESSION_MANAGER=local/Tortosie:@/tmp/.ICE-unix/1159,unix/Tortosie:/tmp/.ICE-unix/1159
SHELL=/bin/zsh
SHELL_SESSION_ID=664d92b603234542a021f347155afc79
SHLVL=1
SYSTEMD_EXEC_PID=1159
TERM=xterm-256color
USER=tortoise
WINDOWID=0
XAUTHORITY=/home/tortoise/.Xauthority
XCURSOR_SIZE=24
XCURSOR_THEME=Sweet-cursors
XDG_CONFIG_DIRS=/home/tortoise/.config/kdedefaults:/etc/xdg
XDG_CURRENT_DESKTOP=KDE
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_ID=2
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
XDG_SESSION_TYPE=x11
XDG_VTNR=1
XMODIFIERS=@im=fcitx
_=/usr/bin/env
ZSH=/home/tortoise/.oh-my-zsh
TERMINFO=/usr/share/terminfo
LD_LIBRARY_PATH=/opt/cuda/lib64:
CONDA_EXE=/home/tortoise/miniconda3/bin/conda
_CE_M=
_CE_CONDA=
CONDA_PYTHON_EXE=/home/tortoise/miniconda3/bin/python
CONDA_SHLVL=0
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:

Offline

#12 2022-07-04 05:34:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: the version of gcc doesn't change

The problem is your PATH. I would bet you have gcc11 in /opt/cuda/bin/, which is overriding the system version.

Offline

#13 2022-07-04 05:35:55

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

thanks, I have solved it
in the /usr/bin/ have many different version, I remove all the gcc*-11 it can work

Offline

#14 2022-07-04 05:36:36

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

Scimmia wrote:

The problem is your PATH. I would bet you have gcc11 in /opt/cuda/bin/, which is overriding the system version.

what I do it rm /usr/bin/gcc*-11

Offline

#15 2022-07-04 05:42:03

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: the version of gcc doesn't change

Unbelievable.

Congratulations, you just ruined CUDA.

Reinstall gcc11, then fix your PATH.

Offline

#16 2022-07-04 05:53:46

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

Scimmia wrote:

Unbelievable.

Congratulations, you just ruined CUDA.

Reinstall gcc11, then fix your PATH.

emmmm,the cuda can use docker to run a container, now I do that, So it not the problem, thanks

Offline

#17 2022-07-04 05:57:23

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

Scimmia wrote:

Unbelievable.

Congratulations, you just ruined CUDA.

Reinstall gcc11, then fix your PATH.

I try the cuda, it also can run correctly~ thanks, maybe it has questions I don't find

Offline

#18 2022-07-04 06:50:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,547

Re: the version of gcc doesn't change

LC_ALL=C pacman -Qs 'cuda|gcc'
LC_ALL=C type nvcc
LC_ALL=C pacman -Qkk cuda gcc11

Online

#19 2022-07-05 18:30:40

rusty_tendrils
Member
Registered: 2022-07-05
Posts: 1

Re: the version of gcc doesn't change

You probably have your path for cuda set preceding the $PATH. (probably in .bashrc).
Just make sure it comes after it.
this:

 export PATH=$PATH:/opt/cuda/bin 

not this:

 export PATH=/opt/cuda/bin:$PATH 

Offline

#20 2022-07-10 14:18:28

GSTortoise
Member
Registered: 2022-07-04
Posts: 13

Re: the version of gcc doesn't change

rusty_tendrils wrote:

You probably have your path for cuda set preceding the $PATH. (probably in .bashrc).
Just make sure it comes after it.
this:

 export PATH=$PATH:/opt/cuda/bin 

not this:

 export PATH=/opt/cuda/bin:$PATH 

Oh, thanks, it resolves my question! I needn't mv gcc*-11 any more

Offline

Board footer

Powered by FluxBB