Skip to content

Conversation

zeroheure
Copy link

@zeroheure zeroheure commented Jun 19, 2021

GCC 10 default to -fno-common which force use of extern with global variable.
This revert the flag. See https://gcc.gnu.org/gcc-10/porting_to.html

Fix #119

GCC 10 default to -fno-common which force use of extern with global variable. 
This disable the option. See https://gcc.gnu.org/gcc-10/porting_to.html
Co-authored-by: Ivan Kuchin <[email protected]>
@gdarko
Copy link

gdarko commented Apr 26, 2022

As of April 2022 this is a problem on Ubuntu 22.04

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:(.bss+0x8): multiple definition of `VERSION'; /tmp/cc3e1HIE.o:(.bss+0x28): first defined here
/usr/bin/ld: src/util.o:(.bss+0x0): multiple definition of `progname'; /tmp/cc3e1HIE.o:(.bss+0x20): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:42: jpeg-recompress] Error 1

@SomeTroglodyte
Copy link

As of 2025-05 this is still a problem in Ubuntu 24.04. #128 doesn't cut it, but this one does. Also, readme.md should be amended to not clone the current mozjpeg state but use 3.3.1 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to GCC 10 changes

4 participants