make fails - multiple definition
Closed this issue · 6 comments
Hi,
I try to reinstall hubicfuse from githut clone on Fedora 34.
git clone and configure are OK but make fails with following messages:
$ LANG=C make
gcc -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -g -O2 -I/usr/include/libxml2 -I/usr/include/fuse -D_FILE_OFFSET_BITS=64 -I/usr/include/json-c -o hubicfuse cloudfsapi.c cloudfuse.c commonfs.c -lxml2 -lcurl -lfuse -pthread -lssl -lcrypto -ljson-c -lmagic
/usr/bin/ld: /tmp/cckTU9Yr.o:/home/didier/github/hubicfuse/cloudfsapi.h:69: multiple definition of `segment_size'; /tmp/cc7sNDAg.o:/home/didier/github/hubicfuse/cloudfsapi.h:69: first defined here
/usr/bin/ld: /tmp/cckTU9Yr.o:/home/didier/github/hubicfuse/cloudfsapi.h:70: multiple definition of `segment_above'; /tmp/cc7sNDAg.o:/home/didier/github/hubicfuse/cloudfsapi.h:70: first defined here
/usr/bin/ld: /tmp/cckTU9Yr.o:/home/didier/github/hubicfuse/cloudfsapi.h:72: multiple definition of `override_storage_url'; /tmp/cc7sNDAg.o:/home/didier/github/hubicfuse/cloudfsapi.h:72: first defined here
/usr/bin/ld: /tmp/cckTU9Yr.o:/home/didier/github/hubicfuse/cloudfsapi.h:73: multiple definition of `public_container'; /tmp/cc7sNDAg.o:/home/didier/github/hubicfuse/cloudfsapi.h:73: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:30: hubicfuse] Error 1
Fedora 34 provides:
gcc-11.1.1-3.fc34.x86_64
GNU ld version 2.35.1-41.fc34
Thanks for any help !
I don't have this issue on my side with gcc 10.2. Have you tried to clean up and build again:
$ make clean
$ ./configure
$ make
I tried to do make clean before configure but I have the same error (see attached log).
Bisecting on VirtualBox machines:
- make works on Fedora 30 with gcc-9.0.1-0.10.fc30.x86_64 and GNU ld version 2.31.1-37.fc30
- make fails on Fedora 32 with gcc-10.3.1-1.fc32.x86_64 and GNU ld version 2.34-2.fc32
@didierga : Sorry I had a local patch since more than 8 months to fix this issue. Please try with current master.
@TurboGit : Merci Pascal for your prompt answer.
Problem is fixed and I installed hubicfuse on Fedora 34.
As I had a copy of my ~/.hubicfuse file I can access to my files with no problem but I dont find how to recreate my client_id and client_secret if needed but this is an other problem !
Ok, closing then.