[GH-ISSUE #474] error compiling on rasberypi #262

Closed
opened 2026-03-04 01:43:48 +03:00 by kerem · 1 comment
Owner

Originally created by @toshitanian on GitHub (Sep 21, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/474

pi@raspberrypi /usr/local/src/s3fs-fuse $ make
make  all-recursive
make[1]: Entering directory '/usr/local/src/s3fs-fuse'
Making all in src
make[2]: Entering directory '/usr/local/src/s3fs-fuse/src'
g++  -g -O2 -Wall -D_FILE_OFFSET_BITS=64   -o s3fs s3fs.o curl.o cache.o string_util.o s3fs_util.o fdcache.o common_auth.o addhead.o openssl_auth.o   -lfuse -lcurl -lxml2 -lcrypto   -lrt
/usr/bin/ld: fdcache.o: undefined reference to symbol 'pthread_mutexattr_init@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
Makefile:311: recipe for target 's3fs' failed
make[2]: *** [s3fs] Error 1
make[2]: Leaving directory '/usr/local/src/s3fs-fuse/src'
Makefile:321: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/s3fs-fuse'
Makefile:261: recipe for target 'all' failed
make: *** [all] Error 2

I solved this by adding -pthread to g++ option. (http://stackoverflow.com/questions/22180354/why-am-i-getting-undefined-reference-to-pthread-mutexattr-settype)

Originally created by @toshitanian on GitHub (Sep 21, 2016). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/474 ``` pi@raspberrypi /usr/local/src/s3fs-fuse $ make make all-recursive make[1]: Entering directory '/usr/local/src/s3fs-fuse' Making all in src make[2]: Entering directory '/usr/local/src/s3fs-fuse/src' g++ -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -o s3fs s3fs.o curl.o cache.o string_util.o s3fs_util.o fdcache.o common_auth.o addhead.o openssl_auth.o -lfuse -lcurl -lxml2 -lcrypto -lrt /usr/bin/ld: fdcache.o: undefined reference to symbol 'pthread_mutexattr_init@@GLIBC_2.4' //lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line collect2: ld returned 1 exit status Makefile:311: recipe for target 's3fs' failed make[2]: *** [s3fs] Error 1 make[2]: Leaving directory '/usr/local/src/s3fs-fuse/src' Makefile:321: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/usr/local/src/s3fs-fuse' Makefile:261: recipe for target 'all' failed make: *** [all] Error 2 ``` I solved this by adding `-pthread` to g++ option. (http://stackoverflow.com/questions/22180354/why-am-i-getting-undefined-reference-to-pthread-mutexattr-settype)
kerem closed this issue 2026-03-04 01:43:50 +03:00
Author
Owner

@ggtakec commented on GitHub (Oct 2, 2016):

@kawasakitoshiya
It's glad for your result.
But why did it generate without -pthread by your coonfigure on Raspberry Pi?
If you know the reason, please post here.

Thanks in advance for your help.
And I'm closing this issue.

<!-- gh-comment-id:250956573 --> @ggtakec commented on GitHub (Oct 2, 2016): @kawasakitoshiya It's glad for your result. But why did it generate without -pthread by your coonfigure on Raspberry Pi? If you know the reason, please post here. Thanks in advance for your help. And I'm closing this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#262
No description provided.