Installing Samba 3.0.28 on Mac OS X 10.6.2
#1
Hi,

This is my first post on this forum, so please excuse me I there is any mistake on my side. I am new to Mac OS X, I am trying to compile XBMC source code for which I have to install Samba 3.0.28 (downloaded from http://news.samba.org/releases/3.0.28/). When I try to configure samba source code it configure but when I try to compile it generates following error
{{{"Compiling lib/smbreadline/smbreadline.c
lib/smbreadline/smbreadline.c: In function ‘smb_readline’:
lib/smbreadline/smbreadline.c:132: error: ‘rl_completion_func_t’ undeclared (first use in this function)
lib/smbreadline/smbreadline.c:132: error: (Each undeclared identifier is reported only once
lib/smbreadline/smbreadline.c:132: error: for each function it appears in.)
lib/smbreadline/smbreadline.c:132: error: syntax error before ‘)’ token
The following command failed:
gcc -fno-common -I./include -I. -I./lib -I./../lib/replace -I./../lib/talloc -I./.. -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H -c lib/smbreadline/smbreadline.c -o lib/smbreadline/smbreadline.o
make: *** [lib/smbreadline/smbreadline.o] Error 1
"}}}.

Can some help me out in sorting out the above problem.

Regards,

C. Ravi Shankar
Reply
#2
ravishankar Wrote:Hi,

This is my first post on this forum, so please excuse me I there is any mistake on my side. I am new to Mac OS X, I am trying to compile XBMC source code for which I have to install Samba 3.0.28 (downloaded from http://news.samba.org/releases/3.0.28/). When I try to configure samba source code it configure but when I try to compile it generates following error
{{{"Compiling lib/smbreadline/smbreadline.c
lib/smbreadline/smbreadline.c: In function ‘smb_readline’:
lib/smbreadline/smbreadline.c:132: error: ‘rl_completion_func_t’ undeclared (first use in this function)
lib/smbreadline/smbreadline.c:132: error: (Each undeclared identifier is reported only once
lib/smbreadline/smbreadline.c:132: error: for each function it appears in.)
lib/smbreadline/smbreadline.c:132: error: syntax error before ‘)’ token
The following command failed:
gcc -fno-common -I./include -I. -I./lib -I./../lib/replace -I./../lib/talloc -I./.. -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H -c lib/smbreadline/smbreadline.c -o lib/smbreadline/smbreadline.o
make: *** [lib/smbreadline/smbreadline.o] Error 1
"}}}.

Can some help me out in sorting out the above problem.

Regards,

C. Ravi Shankar

First question is why Samba 3.0.28 when Samba 3.2.8 is present in the xbmc macports depends?

See http://code.google.com/p/xbmc-port-depends/ on how to install a macports that is compatible with the xbmc build system.
Reply
#3
Hi Sir,

I have tried to install port form the link which you have provided and continued form step 3.1 given in link (http://wiki.xbmc.org/index.php?title=HOW...ource_code), but was not able to compile the xbmc source code. I also tried to start the hole procedure of installing ports, but this time around I was getting following error while installing libsdl package
{{{

:info:build ./src/video/quartz/SDL_QuartzEvents.m:921: error: 'struct SDL_PrivateVideoData' has no member named 'grab_state'
:info:build make: *** [build/SDL_QuartzEvents.lo] Error 1
:info:build shell command " cd "/opt/local/var/macports/build/_Users_sumitghosh_xbmc-port-depends-read-only_dports_devel_libsdl/work/SDL-1.2.13" && /usr/bin/make all " returned error 2
:error:build Target org.macports.build returned: shell command failed
:debug:build Backtrace: shell command failed
while executing
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"

}}}

Regards,
C. Ravi Shankar
Reply
#4
Forget that wiki link, it's old and out dated.

follow http://code.google.com/p/xbmc-port-depends/

step 7 says to continue with step 3.1 in README.osx.

Also, you must have 10.4SDK installed, we don't support any other build method at this time.

If you follow the above link and the README.osx to the letter, then you will get XBMC building. If you deviate, the build will fail.
Reply
#5
Hi Sir,

The link which you have provided is exactly the same as the previous one,
previous one :- http://code.google.com/p/xbmc-port-depends/
Now : http://code.google.com/p/xbmc-port-depends/
Please provide me with both the links which I should follow to compile the source code.
I have 10.4 SDK installed.

Regards,
C. Ravi Shankar
Reply
#6
ravishankar Wrote:Hi Sir,

The link which you have provided is exactly the same as the previous one,
previous one :- http://code.google.com/p/xbmc-port-depends/
Now : http://code.google.com/p/xbmc-port-depends/
Please provide me with both the links which I should follow to compile the source code.
I have 10.4 SDK installed.

Regards,
C. Ravi Shankar

The link YOU quotes (http://wiki.xbmc.org/index.php?title=HOW...ource_code) is out of date.

Follow http://code.google.com/p/xbmc-port-depends, the last step (step 7) tells you to continue at continue with step 3.1 in README.osx.

If you have done this, then pastebin the output of

./bootstrap
./configure
make
and config.log
Reply
#7
Hi Sir,

I have tried to follow the instructions given in the corresponding documents provided by you but was not able to install mac port 1.7.1 as I have (Intel based) Mac OS X 10.6.4. I try to install mac ports 1.7.1 using source code form xbmc-port-depends-read-only it compile but generate error while make install when searched about this error I got this link (http://www.celsius1414.com/2007/05/07/ho...stallation) I have tried suggestion given in this link but end up with same error elaborated below. When I try to install mac port 1.7.1 using installer then it prompts that this mac port can only be installed on mac os x 10.5.x. I have tried to build the source code by installing mac port 1.9.1 ever thing goes smoothly until I execute "sudo port -f install samba3 macosx_deployment_target=10.4". It gives following error.
error form main.log file
{{{

:info:build lib/util.c: In function 'this_is_smp':
:info:build lib/util.c:3141: error: '_SC_NPROCESSORS_ONLN' undeclared (first use in this function)
:info:build lib/util.c:3141: error: (Each undeclared identifier is reported only once
:info:build lib/util.c:3141: error: for each function it appears in.)
:info:build The following command failed:
:info:build /usr/bin/gcc-4.0 -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_samba3/work/samba-3.2.15/source -pipe -O2 -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch x86_64 -O -D_SAMBA_BUILD_=3 -fno-common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_samba3/work/samba-3.2.15/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -I/opt/local/include -DHAVE_STRUCT_TIMESPEC -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -I./popt -I/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_samba3/work/samba-3.2.15/source/lib -D_SAMBA_BUILD_=3 -fPIE -c lib/util.c -o lib/util.o
:info:build make: *** [lib/util.o] Error 1
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_samba3/work/samba-3.2.15/source" && /usr/bin/make all " returned error 2
:error:build Target org.macports.build returned: shell command failed
:debug:build Backtrace: shell command failed
while executing
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for samba3): org.macports.activate org.macports.build org.macports.destroot org.macports.install

}}}

Can you please help me out in resolving above problem, thanks a lot for you continuing support.

Regards.
C. Ravi Shankar
Reply
#8
ravishankar Wrote:Hi Sir,

I have tried to follow the instructions given in the corresponding documents provided by you but was not able to install mac port 1.7.1 as I have (Intel based) Mac OS X 10.6.4. I try to install mac ports 1.7.1 using source code form xbmc-port-depends-read-only it compile but generate error while make install when searched about this error I got this link (http://www.celsius1414.com/2007/05/07/ho...stallation) I have tried suggestion given in this link but end up with same error elaborated below. When I try to install mac port 1.7.1 using installer then it prompts that this mac port can only be installed on mac os x 10.5.x. I have tried to build the source code by installing mac port 1.9.1 ever thing goes smoothly until I execute "sudo port -f install samba3 macosx_deployment_target=10.4". It gives following error.
error form main.log file
{{{

:info:build lib/util.c: In function 'this_is_smp':
:info:build lib/util.c:3141: error: '_SC_NPROCESSORS_ONLN' undeclared (first use in this function)
:info:build lib/util.c:3141: error: (Each undeclared identifier is reported only once
:info:build lib/util.c:3141: error: for each function it appears in.)
:info:build The following command failed:
:info:build /usr/bin/gcc-4.0 -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_samba3/work/samba-3.2.15/source -pipe -O2 -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch x86_64 -O -D_SAMBA_BUILD_=3 -fno-common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_samba3/work/samba-3.2.15/source/iniparser/src -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H -I/opt/local/include -DHAVE_STRUCT_TIMESPEC -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Iinclude -I./include -I. -I. -I./lib/replace -I./lib/talloc -I./lib/tdb/include -I./libaddns -I./librpc -I./popt -I/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_samba3/work/samba-3.2.15/source/lib -D_SAMBA_BUILD_=3 -fPIE -c lib/util.c -o lib/util.o
:info:build make: *** [lib/util.o] Error 1
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_samba3/work/samba-3.2.15/source" && /usr/bin/make all " returned error 2
:error:build Target org.macports.build returned: shell command failed
:debug:build Backtrace: shell command failed
while executing
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for samba3): org.macports.activate org.macports.build org.macports.destroot org.macports.install

}}}

Can you please help me out in resolving above problem, thanks a lot for you continuing support.

Regards.
C. Ravi Shankar

Again, any other macports version but the one at http://code.google.com/p/xbmc-port-depends/ will NOT work. That page describes why.

"I try to install mac ports 1.7.1 using source code form xbmc-port-depends-read-only it compile but generate error while make install" -> you did not restore the gcc to the default. Step 5) mentions this " However, remember that macports itself needs to be built using the xxx-4.2 version or it will fail when doing "make install"" That means make the symlinks to xxx-4.2 for install of macports, then to xxx-4.0 for building the actual macports ports.
Reply
#9
Hi Sir,

Yes, you are right I forgot change the gcc complier to default. Now the mac port compiles with out error but I have another problem in the readme.osx I can't make out what value to in place of "ppc i386"
c) change "universal_archs ppc i386"
to reflect the arch you are building by removing the unused arch.
When I try to install ports without making changes then
sudo port install pcre +universal, generates error where as sudo port install pcre compiles with out error.
I have also tried out universal mode with universal set to x86_64 i386, but it generates error while installation.

Regards,
C. Ravi Shankar.
Reply
#10
ravishankar Wrote:Hi Sir,

Yes, you are right I forgot change the gcc complier to default. Now the mac port compiles with out error but I have another problem in the readme.osx I can't make out what value to in place of "ppc i386"
c) change "universal_archs ppc i386"
to reflect the arch you are building by removing the unused arch.
When I try to install ports without making changes then
sudo port install pcre +universal, generates error where as sudo port install pcre compiles with out error.
I have also tried out universal mode with universal set to x86_64 i386, but it generates error while installation.

Regards,
C. Ravi Shankar.

if you are building for OSX ppc, remove the i386, if you are building for OSX intel, remove the ppc. Do NOT use x86_64, 64 bit builds are not supported. Do you see anything in the guides about using x86_64? No, do not stray from the guides and add random bits unless you fully understand the build process.
Reply
#11
Hi Sir,

Finally I was able to compile XBMC, this was only possible because of your able and precise guidelines. Sir one last request can you please suggest me some tutorials which can help me exploring XCODE and MAC. Thanks one again for your guidance, is there any point system in this forum as in stack over flow.

Regards,
C. Ravi Shankar.
Reply
#12
ravishankar Wrote:Hi Sir,

Finally I was able to compile XBMC, this was only possible because of your able and precise guidelines. Sir one last request can you please suggest me some tutorials which can help me exploring XCODE and MAC. Thanks one again for your guidance, is there any point system in this forum as in stack over flow.

Regards,
C. Ravi Shankar.

google "xcode tutorial", there are plenty of guides out there.

XBMC is two parts, 1) the main binary app and 2) the various internal/external libs and their support. "make xcode_depends" builds support for 2), the xcode project is used to build 1). The xcode project is also used to package XBMC and it's various bits into an XBMC.app container.
Reply
#13
Hello,

I have followed the instruction given in this thread but was not able to compile the source code, can some suggest me where am I going wrong. I got error below when executed command (sudo port install pcre +universal) I also swithed between the compliers 4.2 and 4.0.

[[[ Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_xbmc-port-depends-read-only_dports_archivers_bzip2/work/bzip2-1.0.5" && make all PREFIX="/opt/local" " returned error 2
Command output: rm -f libbz2.dylib
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -dynamiclib blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o -o libbz2.1.0.5.dylib \
-install_name /opt/local/lib/libbz2.1.0.dylib \
-compatibility_version 1.0 -current_version 1.0.5
ld: library not found for -ldylib1.o
collect2: ld returned 1 exit status
make: *** [libbz2.dylib] Error 1

Error: The following dependencies failed to build: bzip2 ncurses ncursesw readline zlib
Error: Status 1 encountered during processing.
]]]

Thanks,
Reply
#14
jinith Wrote:Hello,

I have followed the instruction given in this thread but was not able to compile the source code, can some suggest me where am I going wrong. I got error below when executed command (sudo port install pcre +universal) I also swithed between the compliers 4.2 and 4.0.

[[[ Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_xbmc-port-depends-read-only_dports_archivers_bzip2/work/bzip2-1.0.5" && make all PREFIX="/opt/local" " returned error 2
Command output: rm -f libbz2.dylib
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -dynamiclib blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o -o libbz2.1.0.5.dylib \
-install_name /opt/local/lib/libbz2.1.0.dylib \
-compatibility_version 1.0 -current_version 1.0.5
ld: library not found for -ldylib1.o
collect2: ld returned 1 exit status
make: *** [libbz2.dylib] Error 1

Error: The following dependencies failed to build: bzip2 ncurses ncursesw readline zlib
Error: Status 1 encountered during processing.
]]]

Thanks,

ls -l /Developer/SDKs/MacOSX10.4u.sdk
Reply
#15
davilla Wrote:ls -l /Developer/SDKs/MacOSX10.4u.sdk

Error is as following

[[[

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_xbmc-port-depends-read-only_dports_archivers_bzip2/work/bzip2-1.0.5" && make all PREFIX="/opt/local" " returned error 2
Command output:
If compilation produces errors, or a large number of warnings,
please read README.COMPILATION.PROBLEMS -- you might be able to
adjust the flags in this Makefile to improve matters.

Also in README.COMPILATION.PROBLEMS are some hints that may help
if your build produces an executable which is unable to correctly
handle so-called 'large files' -- files of size 2GB or more.

/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c blocksort.c
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c huffman.c
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c crctable.c
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c randtable.c
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c compress.c
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c decompress.c
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c bzlib.c
rm -f libbz2.a
ar cq libbz2.a blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o
ranlib libbz2.a
rm -f libbz2.dylib
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -dynamiclib blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o -o libbz2.1.0.5.dylib \
-install_name /opt/local/lib/libbz2.1.0.dylib \
-compatibility_version 1.0 -current_version 1.0.5
ld: library not found for -ldylib1.o
collect2: ld returned 1 exit status
make: *** [libbz2.dylib] Error 1

Error: The following dependencies failed to build: bzip2 ncurses ncursesw readline zlib
Error: Status 1 encountered during processing.
]]]

Thanks,
Reply

Logout Mark Read Team Forum Stats Members Help
Installing Samba 3.0.28 on Mac OS X 10.6.20