TurboGit/hubicfuse

Make error

stef157 opened this issue · 4 comments

Hi all,

I'm trying to "make" Hubicfuse but with no luck.

Here is the output :

./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
gcc -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -g -O2 -I/usr/include/libxml2     -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse     -I/usr/include/json-c   -o hubicfuse cloudfsapi.c cloudfuse.c commonfs.c -lxml2   -lcurl   -lfuse   -lssl -lcrypto   -ljson-c   -lmagic 
cloudfsapi.c:709: error: undefined reference to 'pthread_create'
cloudfsapi.c:714: error: undefined reference to 'pthread_join'
cloudfsapi.c:1002: error: undefined reference to 'clock_gettime'
cloudfuse.c:706: error: undefined reference to 'clock_gettime'
cloudfuse.c:242: error: undefined reference to 'clock_gettime'
cloudfuse.c:1016: error: undefined reference to 'pthread_mutexattr_init'
cloudfuse.c:1017: error: undefined reference to 'pthread_mutexattr_settype'
commonfs.c:109: error: undefined reference to 'clock_gettime'
collect2: error: ld returned 1 exit status
make: *** [hubicfuse] Erreur 1

I've install all the library but the error is still there… an idea on how to resolve it ?

Kind regards

OS : Debian 7

Which command did you run? config.status?

The proper incantation is:
./configure
make

I've done this :

root@mail:/opt# git clone https://github.com/TurboGit/hubicfuse.git
Cloning into 'hubicfuse'...
remote: Counting objects: 1079, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 1079 (delta 0), reused 1 (delta 0), pack-reused 1077
Receiving objects: 100% (1079/1079), 545.21 KiB | 1018 KiB/s, done.
Resolving deltas: 100% (667/667), done.
root@mail:/opt# cd hubicfuse
root@mail:/opt/hubicfuse# ./configure 
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for XML... yes
checking for CURL... yes
checking for FUSE... yes
checking for JSON... yes
checking for OPENSSL... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdint.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking fuse.h usability... yes
checking fuse.h presence... yes
checking for fuse.h... yes
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking libxml/tree.h usability... yes
checking libxml/tree.h presence... yes
checking for libxml/tree.h... yes
checking openssl/crypto.h usability... yes
checking openssl/crypto.h presence... yes
checking for openssl/crypto.h... yes
checking magic.h usability... yes
checking magic.h presence... yes
checking for magic.h... yes
checking for an ANSI C-conforming const... yes
checking for uid_t in sys/types.h... yes
checking for mode_t... yes
checking for off_t... yes
checking for size_t... (cached) yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct stat.st_blocks... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for alarm... yes
checking for working mktime... yes
checking return type of signal handlers... void
checking for vprintf... yes
checking for _doprnt... no
checking for ftruncate... yes
checking for memmove... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
root@mail:/opt/hubicfuse# make
gcc -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -g -O2 -I/usr/include/libxml2     -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse     -I/usr/include/json-c   -o hubicfuse cloudfsapi.c cloudfuse.c commonfs.c -lxml2   -lcurl   -lfuse   -lssl -lcrypto   -ljson-c   -lmagic 
cloudfsapi.c:709: error: undefined reference to 'pthread_create'
cloudfsapi.c:714: error: undefined reference to 'pthread_join'
cloudfsapi.c:1002: error: undefined reference to 'clock_gettime'
cloudfuse.c:706: error: undefined reference to 'clock_gettime'
cloudfuse.c:242: error: undefined reference to 'clock_gettime'
cloudfuse.c:1016: error: undefined reference to 'pthread_mutexattr_init'
cloudfuse.c:1017: error: undefined reference to 'pthread_mutexattr_settype'
commonfs.c:109: error: undefined reference to 'clock_gettime'
collect2: error: ld returned 1 exit status
make: *** [hubicfuse] Erreur 1

Strange! Maybe your fuse implementation is not thread safe? Anyway, before make can you edit Makefile and add in LIBS -lpthread, it should looks like this:

LIBS = -lxml2 -lcurl -lfuse -pthread -lssl -lcrypto -ljson-c -lmagic

Does it work?

No feedback, maybe the issue is solved! It would be nice to have feedback in those cases...

Anyway, closing.