Problem compiling Samba 3.5.1 on Solaris 10 with gcc (3.4.6)


 
Thread Tools Search this Thread
Operating Systems Solaris Problem compiling Samba 3.5.1 on Solaris 10 with gcc (3.4.6)
# 1  
Old 03-19-2010
Problem compiling Samba 3.5.1 on Solaris 10 with gcc (3.4.6)

I'm getting this error when 'Linking shared library bin/libtalloc.so.2'... anyone know what's up here?

Code:
Using CFLAGS     = -O -I. -I/source/samba-3.5.1/source3 -I/source/samba-3.5.1/source3/../lib/popt -I/source/samba-3.5.1/source3/iniparser/src -Iinclude -I./include  -I. -I. -I./../lib/replace -I./../lib/tevent -I./libaddns -I./librpc -I./.. -I./../lib/talloc -I../lib/tdb/include -DHAVE_CONFIG_H  -I/usr/local/include -I/usr/local/ssl/include -I/usr/sfw/include -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED -DSUNOS5  -I/source/samba-3.5.1/source3/lib -I.. -I../source4 -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3
      PICFLAG    = -fPIC
      LIBS       = -lsendfile -lresolv -lrt -lnsl -lsocket -liconv
      LDFLAGS    = -pie  -Wl,-z,ignore -R/usr/local/lib:/usr/local/ssl/lib:/usr/sfw/lib -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/sfw/lib -lthread -L./bin
      DYNEXP     = 
      LDSHFLAGS  = -G  -Wl,-z,ignore -R/usr/local/lib:/usr/local/ssl/lib:/usr/sfw/lib -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/sfw/lib -lthread -L./bin -lc -Wl,-z,defs
      SHLIBEXT   = so
      SONAMEFLAG = -Wl,-soname=

Compiling ../lib/talloc/talloc.c
Linking non-shared library bin/libtalloc.a
Compiling ../lib/replace/replace.c
Compiling ../lib/replace/snprintf.c
Compiling ../lib/replace/getpass.c
Compiling ../lib/replace/strptime.c
Compiling ../lib/replace/timegm.c
Compiling ../lib/replace/getifaddrs.c
creating /source/samba-3.5.1/source3/exports/libtalloc.syms
Linking shared library bin/libtalloc.so.2
ld: warning: option -o appears more than once, first setting taken
Undefined                       first referenced
 symbol                             in file
main                                /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crt1.o
ld: fatal: Symbol referencing errors. No output written to bin/libtalloc.so.2
collect2: ld returned 1 exit status
gmake: *** [bin/libtalloc.so.2] Error 1

EDIT: Samba v3.4.7 compiles just fine, so looks like they've broken it moving to v3.5.x!!!

Last edited by son_t; 03-31-2010 at 10:32 AM..
# 2  
Old 03-22-2010
Same problem here, same error. Smilie
Please update if you find a solution.

Thx.
# 3  
Old 03-22-2010
I see no errors in the 3.4.7 log, just warnings.

With 3.5.1, it seems libtalloc contains a main function which is probably not expected from a library.
# 4  
Old 03-22-2010
To make a shared object, the GCC option is "-shared". It looks like the compilation is using "-G", which is the Sun Studio option to link a shared object.
# 5  
Old 03-29-2010
Anything new? Any workaround?

THX

Regards

Meg
# 6  
Old 03-30-2010
After changing
Code:
-G

to
Code:
-fPIC -shared

, it compiles, but if i want start the nmbd:

Code:
ld.so.1: nmbd: fatal: relocation error: file nmbd: symbol _talloc_free: referenced symbol not found
Killed

Edit: Fixed... nmbd was linked with the false lib

Last edited by Megachip; 03-31-2010 at 11:13 AM..
# 7  
Old 03-31-2010
I've not tried the -G option, but I've gone to the 3.4.7 version which does compile, and solves my immediate problems...

However, I'm having these errors in the client log files:
Code:
[2010/03/31 14:28:04,  0] lib/util_sock.c:1491(get_peer_addr_internal)
  read_fd_with_timeout: client 0.0.0.0 read error = Transport endpoint is not connected.
  getpeername failed. Error was Transport endpoint is not connected
  read_fd_with_timeout: client 0.0.0.0 read error = Transport endpoint is not connected.

A google, advises to block port 445, but I'm not sure this is a good idea... Does anyone know if I need port 445 for SAMBA to work or not?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Problem compiling mod_nss for Apache2.2 Solaris 10

Following this guide for Solaris 9. Updated it for the nspr-4.6.4 and nss-3.11.4. Here is my configure command in the mod_nss 1.0.8 dir: ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-nss=/usr/local/nss-3.11.4/ --with-nspr=/usr/local/nspr-4.6.4/ And here is the error... (2 Replies)
Discussion started by: LittleLebowski
2 Replies

2. Solaris

Compiling Error in Samba 3.4.1 on Solaris 10

Hi all, I am getting the following error While installing Samba 3.4.1 on Solaris 10. #./autogen.sh ./autogen.sh : autoheader : not found ./autogen.sh : test : argument expected Please help me as I am in a critical state of the project. Warm regards, Sathya (10 Replies)
Discussion started by: sathya47
10 Replies

3. Programming

Problem with static compiling - GCC

Hi guys. I want to compile three files: gcc -static main.c fib.c fib.h it is pure C i mean i use standard C library. but it gives me this error: /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit status what should i do? (4 Replies)
Discussion started by: majid.merkava
4 Replies

4. Programming

gcc compiling error

I am using gcc to compile c objects on solaris 5.10 and hit the following error messages: /usr/include/sys/vfs.h:323: error: syntax error before "statvfs64_t" /usr/include/sys/vfs.h:334: error: syntax error before "statvfs64_t" gmake: *** Error 1 The c program files were copied over from... (3 Replies)
Discussion started by: med7006
3 Replies

5. UNIX for Dummies Questions & Answers

Compiling samba problem

People i download the lastest version of samba i`am tryng to compile it in a solaris 9 i'm reading the how to of samba, i am in the first step making the autogen.sh but show me this when i do ./autogen.sh ./autogen.sh: running script/mkversion.sh ./script/mkversion.sh: 'include/version.h'... (0 Replies)
Discussion started by: enkei17
0 Replies

6. Solaris

problem compiling apache on solaris

Hi I'm trying to install apache 2.2.14 on Solaris with Openssl. I'm using following configure options: ./configure --prefix=/usr/local/apache2 --enable-ssl --enable-module=so --enable-proxy=shared --enable-proxy-http=shared --enable-proxy-ajp=shared --with-ssl=/usr/local/openssl ... (3 Replies)
Discussion started by: Aelfric
3 Replies

7. Solaris

gcc problem on Solaris

I just installed gcc from the latest package at sunfreeware.com using pkgadd. I write a simple 'Hello World!' program to test it. I try to compile it and I get this error: rockstar# gcc hello.c -o hello ld.so.1: gcc: fatal: libiconv.so.2: open failed: No such file or directory Killed I... (0 Replies)
Discussion started by: Bradj47
0 Replies

8. Programming

gcc compiling with -DUSE_LONGLONG

Sorry for a silly question. I a program that need to compile with -DUSE_LONGLONG to turn on the long Int as the document of that program said so, but I really don't know how to do this. I normally do this: ./configure make make install and it works fine. But I don't know how to compile... (2 Replies)
Discussion started by: hiepng
2 Replies

9. UNIX for Dummies Questions & Answers

errors compiling gcc 4.2.1

Hello, I have never had a successful compile on the 2.6 kernel. On every arch in which I try to compile gcc I get either "i686-pc-cygwin-ar command not found or "i686-suse-linux-ar command not found. This always happens during the make process after configure checks for ar and finds it's just ar.... (2 Replies)
Discussion started by: kwa71
2 Replies

10. Programming

beginner at C: Need help compiling/linking with gcc

I'm trying to do something fairly simple but keep getting frustrating messages.. Here it is: I have 3 files: init.h <header> init.c <#include <curses.h> and "init.h"> main.c <#include "init.h"> now, how can I compile my main.c using gcc? ( I have a hard time making the init.o) ... (1 Reply)
Discussion started by: My_Name
1 Replies
Login or Register to Ask a Question