Building Samba 3.2.0 on Solaris with Sun compiler

View: New views
10 Messages — Rating Filter:   Alert me  

Building Samba 3.2.0 on Solaris with Sun compiler

by David Eisner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I was able to build Samba 3.0.x under Solaris 10 using the Sun Studio
compiler (cc) and the Solaris ld (/usr/ccs/bin/ld) that it uses.

Trying to build Samba 3.2.0, however, I immediately run into a problem
where the build process assumes the linker understands
"--version-script", which is specific to the GNU linker:

  Linking shared library bin/libtalloc.so
  /usr/ccs/bin/ld: illegal option -- version-script
  usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?] file(s)
          [-64]           enforce a 64-bit link-edit

Is this a bug?

Thanks.

-David




--
David Eisner http://cradle.brokenglass.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: Building Samba 3.2.0 on Solaris with Sun compiler

by David Eisner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Still wondering:  Is building with cc (as opposed to gcc) on Solaris
10 supported with Samba 3.2.0?

Thanks again.

-David


On Mon, Jul 21, 2008 at 5:09 PM, David Eisner <deisner@...> wrote:

> I was able to build Samba 3.0.x under Solaris 10 using the Sun Studio
> compiler (cc) and the Solaris ld (/usr/ccs/bin/ld) that it uses.
>
> Trying to build Samba 3.2.0, however, I immediately run into a problem
> where the build process assumes the linker understands
> "--version-script", which is specific to the GNU linker:
>
>  Linking shared library bin/libtalloc.so
>  /usr/ccs/bin/ld: illegal option -- version-script
>  usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?] file(s)
>          [-64]           enforce a 64-bit link-edit
>
> Is this a bug?
>
> Thanks.
>
> -David
>
>
>
>
> --
> David Eisner http://cradle.brokenglass.com
>



--
David Eisner http://cradle.brokenglass.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: Re: Building Samba 3.2.0 on Solaris with Sun compiler

by Volker Lendecke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 28, 2008 at 09:56:23AM -0400, David Eisner wrote:
> Still wondering:  Is building with cc (as opposed to gcc) on Solaris
> 10 supported with Samba 3.2.0?

Should be, sure. The build farm runs some hosts this way.

Volker


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

attachment0 (196 bytes) Download Attachment

Re: Re: Building Samba 3.2.0 on Solaris with Sun compiler

by David Eisner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 28, 2008 at 10:20 AM, Volker Lendecke
<Volker.Lendecke@...> wrote:
> On Mon, Jul 28, 2008 at 09:56:23AM -0400, David Eisner wrote:
>> Still wondering:  Is building with cc (as opposed to gcc) on Solaris
>> 10 supported with Samba 3.2.0?
>
> Should be, sure. The build farm runs some hosts this way.
>
> Volker


When I try to build with cc, it dies almost immediately with this:

   Linking shared library bin/libtalloc.so
   /usr/ccs/bin/ld: illegal option -- version-script
  usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?] file(s)
          [-64]           enforce a 64-bit link-edit
          [-a]            create an absolute file
          [-b]            do not do special PIC relocations in a.out

.. and so on.

The problem is that the Solaris ld does not understand
--version-script: that's specific to the GNU linker.  Looking in the
Makefile, I find the problem here:

   ## Dynamic shared libraries build settings
   DSO_EXPORTS_CMD=-Wl,--version-script,$(srcdir)/exports/`basename $@
| sed 's/so$$/syms/'`

This is hard-coded into Makefile.in; it's not generated by the
configure script.  Unless I'm missing something (which is quite
possible), I don't see how this could work with the Solaris linker.

Thanks again for your help.

-David

--
David Eisner http://cradle.brokenglass.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: Re: Building Samba 3.2.0 on Solaris with Sun compiler

by Volker Lendecke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 28, 2008 at 10:43:12AM -0400, David Eisner wrote:

> On Mon, Jul 28, 2008 at 10:20 AM, Volker Lendecke
> <Volker.Lendecke@...> wrote:
> > On Mon, Jul 28, 2008 at 09:56:23AM -0400, David Eisner wrote:
> >> Still wondering:  Is building with cc (as opposed to gcc) on Solaris
> >> 10 supported with Samba 3.2.0?
> >
> > Should be, sure. The build farm runs some hosts this way.
> >
> > Volker
>
>
> When I try to build with cc, it dies almost immediately with this:
Ok, possibly we have the Solaris compiler but a GNU linker
in the build farm machines. Hmmm. Sorry, I don't have time
right now to fix this really, hunting a SMB signing bug in
3.2 :-(

Volker


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

attachment0 (196 bytes) Download Attachment

Parent Message unknown Re: Re: Building Samba 3.2.0 on Solaris with Sun compiler

by David Eisner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 28, 2008 at 11:00 AM, David Eisner <deisner@...> wrote:
> On Mon, Jul 28, 2008 at 10:58 AM, Volker Lendecke
> <Volker.Lendecke@...> wrote:
>> Ok, possibly we have the Solaris compiler but a GNU linker
>> in the build farm machines. Hmmm. Sorry, I don't have time
>> right now to fix this really, hunting a SMB signing bug in
>> 3.2 :-(
>
> Good luck.  I'll raise a bug, then, now that I have confirmation it's
> something that should, in theory, be working.


I've created a bug report:

   https://bugzilla.samba.org/show_bug.cgi?id=5639

-David


--
David Eisner http://cradle.brokenglass.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: Re: Building Samba 3.2.0 on Solaris with Sun compiler

by David Eisner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 28, 2008 at 11:14 AM, David Eisner <deisner@...> wrote:
> I've created a bug report:
>
>   https://bugzilla.samba.org/show_bug.cgi?id=5639


Correction: The DSO_EXPORTS_CMD is hardcoded into Makefile.in, but
DSO_EXPORTS, which is what is used in the make target, comes from
configure.  If the Solaris ld is found in the PATH before the GNU ld
at configure time, there won't be any problems because the DSO_EXPORTS
macro won't be set to the value of DSO_EXPORTS_CMD.

The linker used is a function of the compiler, not the user's PATH,
but I'm not sure what the best fix is.  Maybe a --without-gnu-ld
option ?

-David

--
David Eisner http://cradle.brokenglass.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: Re: Building Samba 3.2.0 on Solaris with Sun compiler

by Douglas E. Engert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



David Eisner wrote:

> On Mon, Jul 28, 2008 at 11:14 AM, David Eisner <deisner@...> wrote:
>> I've created a bug report:
>>
>>   https://bugzilla.samba.org/show_bug.cgi?id=5639
>
>
> Correction: The DSO_EXPORTS_CMD is hardcoded into Makefile.in, but
> DSO_EXPORTS, which is what is used in the make target, comes from
> configure.  If the Solaris ld is found in the PATH before the GNU ld
> at configure time, there won't be any problems because the DSO_EXPORTS
> macro won't be set to the value of DSO_EXPORTS_CMD.
>
> The linker used is a function of the compiler, not the user's PATH,
> but I'm not sure what the best fix is.  Maybe a --without-gnu-ld
> option ?

Solaris 10 comes with gcc in /usr/sfw/bin

% gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld
--enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

The configure could grep for --without-gnu-ld`


>
> -David
>

--

  Douglas E. Engert  <DEEngert@...>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: Re: Building Samba 3.2.0 on Solaris with Sun compiler

by David Eisner-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 30, 2008 at 10:23 AM, Douglas E. Engert <deengert@...> wrote:

> Solaris 10 comes with gcc in /usr/sfw/bin

I know.  But I was only able to get certain needed packages (looking
through notes ... )  -- I could only get heimdal to build with cc, but
not gcc.

In any case, it's nice that samba <= 3.0.x was not GNU toolchain
specific, and it appears that there's no reason 3.2.0 has to be,
either.

-David


--
David Eisner http://cradle.brokenglass.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Re: Re: Building Samba 3.2.0 on Solaris with Sun compiler

by Ryan Novosielski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Eisner wrote:

> On Wed, Jul 30, 2008 at 10:23 AM, Douglas E. Engert <deengert@...> wrote:
>
>> Solaris 10 comes with gcc in /usr/sfw/bin
>
> I know.  But I was only able to get certain needed packages (looking
> through notes ... )  -- I could only get heimdal to build with cc, but
> not gcc.
>
> In any case, it's nice that samba <= 3.0.x was not GNU toolchain
> specific, and it appears that there's no reason 3.2.0 has to be,
> either.
Another thing to consider is that Sun does a fair amount of trumpeting
about its compiler performance. I don't know what difference that tends
to make as far as Samba is concerned, but if it does make a difference,
it'd be nice to use the best compiler for the job (regardless of whether
GCC is available on that platform, which it tends to always be, and now
especially that the Sun compiler is free).

- --
 ---- _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer II
 |$&| |__| |  | |__/ | \| _| |novosirj@... - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIkPHTmb+gadEcsb4RAnbUAKCYNMzCKy4jN4rNY8ZIM8mY+jlpSwCgxY5R
S46chWL3nQEtF3a+h3bHR04=
=Weh7
-----END PGP SIGNATURE-----

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba
LightInTheBox - Buy quality products at wholesale price