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

compiling sacd-extract fails on Linux (x86) #8

Open
klslz opened this issue Dec 11, 2020 · 4 comments
Open

compiling sacd-extract fails on Linux (x86) #8

klslz opened this issue Dec 11, 2020 · 4 comments

Comments

@klslz
Copy link

klslz commented Dec 11, 2020

Under Linux, on x86 with gcc 10.2.1 and Fedora 33 make fails on sacd-extract:

...
/usr/bin/ld: CMakeFiles/sacd_extract.dir/root/sacd-ripper/libs/libsacd/scarletbook_read.c.o:(.bss+0x10): multiple definition of `character_set_t'; CMakeFiles/sacd_extract.dir/main.c.o:(.bss+0x20): first defined here
/usr/bin/ld: CMakeFiles/sacd_extract.dir/root/sacd-ripper/libs/libsacd/scarletbook_read.c.o:(.bss+0x14): multiple definition of `frame_format_t'; CMakeFiles/sacd_extract.dir/main.c.o:(.bss+0x24): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/sacd_extract.dir/build.make:793: sacd_extract] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/sacd_extract.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

Any ideas?

I did try to compile it as root under ~root

THX

@ghost
Copy link

ghost commented Feb 12, 2021

@klslz Have you got a solution yet?
Thx
PS:Build have suceeded on my raspberry pi, so it may a related specifically to x86, but I still have not found out how.

@kalaklanar
Copy link

I can confirm the issue on x86_64 fedora 33 as OP using the 0.3.9 release and the git release. The same release is working on a Ubuntu 20.04.01 LTS

It also fails on Ubunu 20.10 which leads me to suspect something broke with newer systems.

@dijkstrah
Copy link

Since GCC version 10, default compilation is with -fno-common. The libsacd code has a couple of multiple definitions which cannot be linked if that flag is active. I have to comb through the code for a structural fix. In the meantime you could say: export CFLAGS="-fcommon" and then compile as that is the old behaviour of gcc.

@z4deepfz
Copy link

Pass -DCMAKE_C_FLAGS="-fcommon" to cmake also works.
My approach: cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_C_FLAGS="-fcommon"

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

No branches or pull requests

4 participants