Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to GCC 10 changes #119

Open
TomaszGasior opened this issue Apr 11, 2020 · 3 comments · May be fixed by #121 or #128
Open

Update to GCC 10 changes #119

TomaszGasior opened this issue Apr 11, 2020 · 3 comments · May be fixed by #121 or #128

Comments

@TomaszGasior
Copy link

I am packaging jpeg-archive for Fedora in my COPR repository. In Fedora 32 GCC will be updated to 10 version where there is some change in default configuration, please see here: https://lists.fedoraproject.org/archives/list/[email protected]/thread/RYVPP45PMWPXYBBDKXO3CI7YGL7CDQG6/

I am not C programmer, I can't tell details. Currently I am not able to build jpeg-archive for Fedora 32 and Fedora Rawhide. This is error message:

...
make[1]: Leaving directory '/builddir/build/BUILD/jpeg-archive-2.2.0/src/iqa'
cc -std=c99 -Wall -O3 -I/opt/mozjpeg/include -o jpeg-recompress jpeg-recompress.c src/util.o src/edit.o src/smallfry.o src/iqa/build/release/libiqa.a /opt/mozjpeg/lib64/libjpeg.a -lm
/usr/bin/ld: src/util.o:(.data+0x0): multiple definition of `VERSION'; /tmp/ccAX4593.o:(.bss+0x28): first defined here
/usr/bin/ld: src/util.o:(.bss+0x0): multiple definition of `progname'; /tmp/ccAX4593.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:42: jpeg-recompress] Error 1
TomaszGasior added a commit to TomaszGasior/mushrooms-rpms that referenced this issue Apr 11, 2020
@dbkblk
Copy link

dbkblk commented Jan 11, 2021

The same error occurs when building from Debian 11:

make[1] : on quitte le répertoire « /mnt/lent/Apps/jpeg-archive-2.2.0/src/iqa »
cc -std=c99 -Wall -O3 -I/opt/mozjpeg/include -o jpeg-recompress jpeg-recompress.c src/util.o src/edit.o src/smallfry.o src/iqa/build/release/libiqa.a /opt/mozjpeg/lib64/libjpeg.a -lm
/usr/bin/ld : src/util.o:(.data.rel.local+0x0) : définitions multiples de « VERSION »; /tmp/ccTrjeDy.o:(.bss+0x28) : défini pour la première fois ici
/usr/bin/ld : src/util.o:(.bss+0x0) : définitions multiples de « progname »; /tmp/ccTrjeDy.o:(.bss+0x20) : défini pour la première fois ici
collect2: error: ld returned 1 exit status
make: *** [Makefile:42 : jpeg-recompress] Erreur 1

For those wondering how to build it on Debian 11, install:

sudo apt install gcc-9 gcc9-base
make CC=gcc-9
sudo make install

Althought I recommand this instead of make install:
sudo checkinstall

@zeroheure zeroheure linked a pull request Jun 19, 2021 that will close this issue
@zeroheure
Copy link

See my PR : just add -fcommon to CFLAGS in the Makefile.

@yorkane
Copy link

yorkane commented Jul 11, 2021

See my PR : just add -fcommon to CFLAGS in the Makefile.

Thanks a lot!

sourcejedi added a commit to sourcejedi/jpeg-archive that referenced this issue Aug 1, 2022
Fixes danielgtaylor#119

> /usr/bin/ld: src/util.o:(.data+0x0): multiple definition of `VERSION';
>  /tmp/ccSwNFWH.o:(.bss+0x28): first defined here
> /usr/bin/ld: src/util.o:(.bss+0x0): multiple definition of `progname';
>  /tmp/ccSwNFWH.o:(.bss+0x20): first defined here
> collect2: error: ld returned 1 exit status
sourcejedi added a commit to sourcejedi/jpeg-archive that referenced this issue Aug 1, 2022
Fixes danielgtaylor#119

> /usr/bin/ld: src/util.o:(.data+0x0): multiple definition of `VERSION';
>  /tmp/ccSwNFWH.o:(.bss+0x28): first defined here
> /usr/bin/ld: src/util.o:(.bss+0x0): multiple definition of `progname';
>  /tmp/ccSwNFWH.o:(.bss+0x20): first defined here
> collect2: error: ld returned 1 exit status
shimoju pushed a commit to shimoju/jpeg-archive that referenced this issue Apr 20, 2023
Fixes danielgtaylor#119

> /usr/bin/ld: src/util.o:(.data+0x0): multiple definition of `VERSION';
>  /tmp/ccSwNFWH.o:(.bss+0x28): first defined here
> /usr/bin/ld: src/util.o:(.bss+0x0): multiple definition of `progname';
>  /tmp/ccSwNFWH.o:(.bss+0x20): first defined here
> collect2: error: ld returned 1 exit status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants