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

Unable to Build #10

Open
ghost opened this issue Jan 24, 2021 · 5 comments · May be fixed by #16
Open

Unable to Build #10

ghost opened this issue Jan 24, 2021 · 5 comments · May be fixed by #16

Comments

@ghost
Copy link

ghost commented Jan 24, 2021

When I try to run make I get:

❯ make
[  4%] Building C object libmultihash/CMakeFiles/multihashlib.dir/crc32.c.o
[  8%] Building C object libmultihash/CMakeFiles/multihashlib.dir/edonkey.c.o
[ 12%] Building C object libmultihash/CMakeFiles/multihashlib.dir/md4.c.o
[ 16%] Building C object libmultihash/CMakeFiles/multihashlib.dir/md5.c.o
[ 20%] Building C object libmultihash/CMakeFiles/multihashlib.dir/multihash.c.o
[ 25%] Building C object libmultihash/CMakeFiles/multihashlib.dir/sha1.c.o
[ 29%] Linking C static library libmultihash.a
[ 29%] Built target multihashlib
[ 33%] Building C object libfriidump/CMakeFiles/friidumplib.dir/brickblocker.c.o
[ 37%] Building C object libfriidump/CMakeFiles/friidumplib.dir/disc.c.o
[ 41%] Building C object libfriidump/CMakeFiles/friidumplib.dir/dumper.c.o
[ 45%] Building C object libfriidump/CMakeFiles/friidumplib.dir/dvd_drive.c.o
[ 50%] Building C object libfriidump/CMakeFiles/friidumplib.dir/hitachi.c.o
[ 54%] Building C object libfriidump/CMakeFiles/friidumplib.dir/ecma-267.c.o
[ 58%] Building C object libfriidump/CMakeFiles/friidumplib.dir/lite-on.c.o
[ 62%] Building C object libfriidump/CMakeFiles/friidumplib.dir/misc.c.o
/home/lcoogan/Code/friidump/libfriidump/misc.c: In function ‘_logprintf’:
/home/lcoogan/Code/friidump/libfriidump/misc.c:88:3: warning: implicit declaration of function ‘gettimeofday’ [-Wimplicit-function-declaration]
   88 |   gettimeofday (&now, NULL);
      |   ^~~~~~~~~~~~
[ 66%] Building C object libfriidump/CMakeFiles/friidumplib.dir/renesas.c.o
[ 70%] Building C object libfriidump/CMakeFiles/friidumplib.dir/rs.c.o
/home/lcoogan/Code/friidump/libfriidump/rs.c: In function ‘modnn’:
/home/lcoogan/Code/friidump/libfriidump/rs.c:47:12: warning: right shift count >= width of type [-Wshift-count-overflow]
   47 |     x = (x >> 0xff) + (x & 0xff);
      |            ^~
[ 75%] Building C object libfriidump/CMakeFiles/friidumplib.dir/unscrambler.c.o
[ 79%] Building C object libfriidump/CMakeFiles/friidumplib.dir/vanilla_2064.c.o
[ 83%] Building C object libfriidump/CMakeFiles/friidumplib.dir/vanilla_2384.c.o
[ 87%] Building C object libfriidump/CMakeFiles/friidumplib.dir/win32compat.c.o
[ 91%] Linking C shared library libfriidump.so
/usr/bin/ld: CMakeFiles/friidumplib.dir/unscrambler.c.o:(.bss+0x0): multiple definition of `disctype'; CMakeFiles/friidumplib.dir/disc.c.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [libfriidump/CMakeFiles/friidumplib.dir/build.make:299: libfriidump/libfriidump.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:182: libfriidump/CMakeFiles/friidumplib.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
@MiSimon
Copy link

MiSimon commented Jan 28, 2021

I had the same problem on Ubuntu 20.04 (not on 16.04), i moved the definition of disctype from unscrambler.h to unscrampler.c and changed it to static. It compiled but i could not test the whole program as i am waiting for a new compatible dvd drive.

@xaivior13
Copy link

Copying line 34 from 'unscrambler.h' to line 51 of 'unscrambler.c', then commenting out line 34 allowed me to follow the build instructions in the README. I'll be testing with my drive, though it is not on the compatibility list.

Rastem88 added a commit to Rastem88/friidump that referenced this issue May 18, 2022
@MrArdillo
Copy link

Same problem in Arch and with the AUR package

@aphex3k
Copy link

aphex3k commented Jan 27, 2023

Same problem in Alpine

aphex3k pushed a commit to aphex3k/friidump that referenced this issue Jan 27, 2023
…dir/disc.c.o:(.bss+0x0): first defined here

collect2: error: ld returned 1 exit status

bradenmcd#10
@aphex3k aphex3k linked a pull request Jan 27, 2023 that will close this issue
@vorburger
Copy link

#16 fixes (only) the multiple definition of disctype'`.

In order to fix the implicit declaration of function ‘gettimeofday’, which (at least for me, on Fedora 40) was an error instead of just a warning, you have to un-comment the #include <sys/time.h> in misc.c.

PS: With that it built successfully, and ran, but I still wasn't able to rip, due to unsupported drive.

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 a pull request may close this issue.

5 participants