LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-20-2013, 12:21 PM   #1
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
sshfs-fuse: /usr/bin/ld: cannot find -lfuse


I have been struggling with this the whole day. It's probably something stupid I've missed, but I just can't find out what...

I have installed all dependencies, fuse is installed.
Code:
checking pkg-config is at least version 0.9.0... yes
checking for SSHFS... yes
checking for fuse_opt_parse... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
make  all-am
make[1]: Entering directory `/tmp/build/sshfs/src/sshfs-fuse-2.4'
gcc -DHAVE_CONFIG_H -I.  -D_REENTRANT -DFUSE_USE_VERSION=26 -DLIBDIR=\"/usr/lib\"  -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/fuse -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -O2 -march=corei7 -mtune=generic -Wall -W -Icompat -MT sshfs-sshfs.o -MD -MP -MF .deps/sshfs-sshfs.Tpo -c -o sshfs-sshfs.o `test -f 'sshfs.c' || echo './'`sshfs.c
gcc -DHAVE_CONFIG_H -I.  -D_REENTRANT -DFUSE_USE_VERSION=26 -DLIBDIR=\"/usr/lib\"  -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/fuse -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -O2 -march=corei7 -mtune=generic -Wall -W -Icompat -MT sshfs-cache.o -MD -MP -MF .deps/sshfs-cache.Tpo -c -o sshfs-cache.o `test -f 'cache.c' || echo './'`cache.c
gcc -DHAVE_CONFIG_H -I.  -D_REENTRANT -DFUSE_USE_VERSION=26 -DLIBDIR=\"/usr/lib\"  -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/fuse -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -O2 -march=corei7 -mtune=generic -Wall -W -Icompat -MT sshfs-fuse_opt.o -MD -MP -MF .deps/sshfs-fuse_opt.Tpo -c -o sshfs-fuse_opt.o `test -f 'compat/fuse_opt.c' || echo './'`compat/fuse_opt.c
mv -f .deps/sshfs-fuse_opt.Tpo .deps/sshfs-fuse_opt.Po
sshfs.c: In function 'main':
sshfs.c:3689:2: warning: 'g_thread_init' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations]
mv -f .deps/sshfs-cache.Tpo .deps/sshfs-cache.Po
mv -f .deps/sshfs-sshfs.Tpo .deps/sshfs-sshfs.Po
gcc -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/fuse -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -O2 -march=corei7 -mtune=generic -Wall -W -Icompat   -o sshfs sshfs-sshfs.o sshfs-cache.o sshfs-fuse_opt.o -lfuse -pthread -lgthread-2.0 -pthread -lglib-2.0  
/usr/bin/ld: cannot find -lfuse
collect2: error: ld returned 1 exit status
make[1]: *** [sshfs] Error 1
make[1]: Leaving directory `/tmp/build/sshfs/src/sshfs-fuse-2.4'
make: *** [all] Error 2
I have googled the error, but in all hits I found, a dependency was missing.

Some more info:
Code:
cat /usr/lib/pkgconfig/fuse.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: fuse
Description: Filesystem in Userspace
Version: 2.9.3
Libs: -L${libdir} -lfuse -pthread
Libs.private: -ldl  
Cflags: -I${includedir}/fuse -D_FILE_OFFSET_BITS=64
Files belonging to fuse package:
Code:
fuse /etc/fuse.conf
fuse /etc/udev/rules.d/99-fuse.rules
fuse /lib/libfuse.so.2
fuse /lib/libfuse.so.2.9.3
fuse /sbin/mount.fuse
fuse /usr/bin/fusermount
fuse /usr/bin/ulockmgr_server
fuse /usr/include/fuse.h
fuse /usr/include/fuse/cuse_lowlevel.h
fuse /usr/include/fuse/fuse.h
fuse /usr/include/fuse/fuse_common.h
fuse /usr/include/fuse/fuse_common_compat.h
fuse /usr/include/fuse/fuse_compat.h
fuse /usr/include/fuse/fuse_lowlevel.h
fuse /usr/include/fuse/fuse_lowlevel_compat.h
fuse /usr/include/fuse/fuse_opt.h
fuse /usr/include/ulockmgr.h
fuse /usr/lib/libfuse.so
fuse /usr/lib/libulockmgr.so
fuse /usr/lib/libulockmgr.so.1
fuse /usr/lib/libulockmgr.so.1.0.1
fuse /usr/lib/pkgconfig/fuse.pc
 
Old 07-20-2013, 01:17 PM   #2
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by Lennie View Post
I have been struggling with this the whole day. It's probably something stupid I've missed, but I just can't find out what...
I have installed all dependencies, fuse is installed.

[...]

gcc -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/fuse -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -march=corei7 -mtune=generic -Wall -W -Icompat -o sshfs sshfs-sshfs.o sshfs-cache.o sshfs-fuse_opt.o -lfuse -pthread -lgthread-2.0 -pthread -lglib-2.0
/usr/bin/ld: cannot find -lfuse
[/code]
What happens if you run that gcc command manually but instead of -lfuse, substitute this portion in the command line instead:

Code:
/usr/lib/libfuse.so
The intent is to double check that the libfuse.so symlink points to the actual shared library file. It's possible that /usr/lib/libfuse.so isn't linked properly to /lib/libfuse.so.2.

I'll add that getting the symlinks package is a must have for tracking down broken symlinks:

https://launchpad.net/ubuntu/+source/symlinks/1.4-1

Last edited by re_nelson; 07-20-2013 at 01:21 PM.
 
1 members found this post helpful.
Old 07-20-2013, 02:59 PM   #3
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Original Poster
Rep: Reputation: 85
Thanks for leading me in the right direction. It was a problem with the symlink - it pointed to
/lib/libfuse.so.2.9.2 instead of /lib/libfuse.so.2.9.3. I had forgotten to change that in my buildscript when I updated it...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A find process taking up CPU (su nobody -s /bin/sh -c /usr/bin/find /) linuxandtsm Linux - Newbie 7 06-14-2013 04:35 PM
sshfs without fuse? stateless Linux - Newbie 1 01-30-2013 02:44 PM
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 04:00 AM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
Is '/usr/bin/find' reliable if '/bin/ls' has been replaced? DigaMe Linux - Security 2 11-12-2004 10:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration