#1 Ruby/SMB doesn't make with MacPorts install of samba 3.2.0

open
nobody
None
5
2008-09-14
2008-09-14
Anonymous
No

I've installed the MacPorts samba 3.2.0 library today (9/14/2008
) and tried to get the extconf.rb to run and correctly install ruby-smb, but failed

$ sudo ruby extconf.rb --with-smb-dir=/opt/local/var/macports/software/samba3/ --with-smbclientlib=/opt/local/var/macports/software/samba3/3.2.0_0+darwin_9/opt/local/bin/smbclient
checking for libsmbclient.h... yes
checking for smbc_init() in -lsmbclient... no
Cannot create Makefile
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

I've tried various combos of --with-smb --with-smb-lib --with-smbclientlib with different levels of directories leading to smbclient, but to no avail. I've even tried specifying --with-smb and put the top root samba directory for the macports install, but still nothing. I get this same message each time.

Here's the mkmf.log file:

have_header: checking for libsmbclient.h... -------------------- yes

"gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -Os -pipe -fno-common conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include <libsmbclient.h>
/* end */

--------------------

have_library: checking for smbc_init() in -lsmbclient... -------------------- no

"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. $(CPPFLAGS) -arch ppc -arch i386 -Os -pipe -fno-common conftest.c -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L"/opt/local/var/macports/software/samba3/3.2.0_0+darwin_9/opt/local/bin/smbclient" -L"/opt/local/var/macports/software/samba3/3.2.0_0+darwin_9/opt/local/include/lib" -L. -arch ppc -arch i386 -lruby -lsmbclient -lpthread -ldl -lm "
sh: CPPFLAGS: command not found
conftest.c: In function ‘t’:
conftest.c:3: error: ‘smbc_init’ undeclared (first use in this function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
conftest.c: In function ‘t’:
conftest.c:3: error: ‘smbc_init’ undeclared (first use in this function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
lipo: can't figure out the architecture type of: /var/tmp//cc0As6tc.out
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))smbc_init; return 0; }
/* end */

"gcc -o conftest -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. $(CPPFLAGS) -arch ppc -arch i386 -Os -pipe -fno-common conftest.c -L"." -L"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib" -L"/opt/local/var/macports/software/samba3/3.2.0_0+darwin_9/opt/local/bin/smbclient" -L"/opt/local/var/macports/software/samba3/3.2.0_0+darwin_9/opt/local/include/lib" -L. -arch ppc -arch i386 -lruby -lsmbclient -lpthread -ldl -lm "
sh: CPPFLAGS: command not found
ld: warning in /usr/local/lib/libsmbclient.dylib, file is not of required architecture
Undefined symbols for architecture ppc:
"_smbc_init", referenced from:
_t in ccwGUAub.o
ld: symbol(s) not found for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccsGttgj.out (No such file or directory)
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { smbc_init(); return 0; }
/* end */

--------------------

Seems that the smbc_init() cannot be found in smbclient. I assume it's been updated in the latest release and has broken your code. But I don't really know C, so it's just a guess. Thanks!

Model Name: MacBook Pro
Model Identifier: MacBookPro4,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 3 MB
Memory: 2 GB
Bus Speed: 800 MHz
Boot ROM Version: MBP41.00C1.B03
SMC Version: 1.27f1
Serial Number: W882455CYJX
Sudden Motion Sensor:
State: Enabled

System Version: Mac OS X 10.5.4 (9E17)
Kernel Version: Darwin 9.4.0

ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks