Created attachment 144830 [details] SMB option with linker error Add "SMB_LDFLAGS= -L${LOCALBASE}/lib" to Makefile. I attached a patch. linker error message as follows, gmake-lite[7]: Entering directory `/tmp/usr/ports/multimedia/vlc/work/vlc-2.1.4/modules/access' /bin/sh ../../libtool --tag=CC --mode=link cc -I/usr/local/include/samba -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -O4 -ffast-math -funroll-loops -fomit-frame-pointer -rpath '/usr/local/lib/vlc/plugins/access' -avoid-version -module -export-symbols-regex ^vlc_entry -shrext .so -no-undefined ../../compat/libcompat.la ../../src/libvlccore.la -Wl,-rpath=/usr/lib:/usr/local/lib -fstack-protector -o libaccess_smb_plugin.la libaccess_smb_plugin_la-smb.lo -pthread -lsmbclient libtool: link: rm -fr .libs/libaccess_smb_plugin.exp libtool: link: /usr/bin/nm -B .libs/libaccess_smb_plugin_la-smb.o | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /usr/bin/sed 's/.* //' | sort | uniq > .libs/libaccess_smb_plugin.exp libtool: link: /usr/bin/egrep -e "^vlc_entry" ".libs/libaccess_smb_plugin.exp" > ".libs/libaccess_smb_plugin.expT" libtool: link: mv -f ".libs/libaccess_smb_plugin.expT" ".libs/libaccess_smb_plugin.exp" libtool: link: cc -shared -fPIC -DPIC .libs/libaccess_smb_plugin_la-smb.o -Wl,-rpath -Wl,/tmp/usr/ports/multimedia/vlc/work/vlc-2.1.4/src/.libs -Wl,-rpath -Wl,/usr/local/lib ../../compat/.libs/libcompat.a ../../src/.libs/libvlccore.so -lsmbclient -O2 -O4 -Wl,-rpath=/usr/lib:/usr/local/lib -pthread -pthread -Wl,-soname -Wl,libaccess_smb_plugin.so -Wl,-retain-symbols-file -Wl,.libs/libaccess_smb_plugin.exp -o .libs/libaccess_smb_plugin.so /usr/bin/ld: cannot find -lsmbclient cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake-lite[7]: *** [libaccess_smb_plugin.la] Error 1
I believe this is actually a bug the samba-libsmbclient port. It installs /usr/local/libdata/pkgconfig/smbclient.pc and that file contains these two lines: #Libs: -L/usr/local/lib -lsmbclient Libs: -lsmbclient Remove # from the first line and add # to the second line. Then try to build vlc again without your Makefile modification.
assign PR to group maintainer (They can close it based on tijl comment)
I can confirm this bug in FreeBSD 10. I had to to create sim-links for /usr/local/lib/libsmbclient.a, /usr/local/lib/libsmbclient.so, & /usr/local/lib/libsmbclient.so.0 in /usr/lib in order to compile VLC.
Similar to bug 192044.
(In reply to Jordan Irwin from comment #4) > Similar to bug 192044. Similar fix would be Index: multimedia/vlc/Makefile =================================================================== --- multimedia/vlc/Makefile (revision 362615) +++ multimedia/vlc/Makefile (working copy) @@ -252,6 +252,7 @@ SMB_LIB_DEPENDS= libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient SMB_CONFIGURE_ENABLE= smbclient +SMB_CONFIGURE_ENV= SMBCLIENT_LIBS="-L${LOCALBASE}/lib -lsmbclient" STREAM_CONFIGURE_ENABLE=sout but Tijl's solution sounds better
Created attachment 144905 [details] samba-libsmbclient patch Please apply this patch to your ports tree: If you use subversion: % cd /usr/ports % svn patch /path/to/patch Otherwise: % cd /usr/ports % patch < /path/to/patch Then rebuild net/samba-libsmbclient and try multimedia/vlc.
All the .pc.in files as provided by upstream have the commented Libs line with libdir and another Libs line without. Rather than patch just this one, it would make more sense to patch all the pkgconf files in the master port, which would fix all the slaves at once.
Over to maintainer of samba ports to fix samba pkgconfig files.
A commit references this bug: Author: timur Date: Fri Aug 8 21:36:33 UTC 2014 New revision: 364390 URL: http://svnweb.freebsd.org/changeset/ports/364390 Log: Add explicitly library path to the corresponding .pc files PR: 191997 Changes: head/net/samba-libsmbclient/Makefile head/net/samba36/Makefile