Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Oct 2001 21:46:54 +0900
From:      OKAZAKI Tetsurou <okazaki@FreeBSD.org>
To:        "Chad R. Larson" <chad@DCFinc.com>
Cc:        ports@FreeBSD.org
Subject:   Re: bzip2 make breakage
Message-ID:  <lxzo78x54x.wl@dolphin.be.to>
In-Reply-To: <20011002172306.A26342@freeway.dcfinc.com>
References:  <20011002172306.A26342@freeway.dcfinc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the message <20011002172306.A26342@freeway.dcfinc.com> 
"Chad R. Larson" <chad@DCFinc.com> wrote:

> I had to make the following edit to get bzip2 to build on my
> 2.2.8-STABLE system.  It doesn't look to me like this is an O/S
> version issue, however.  We were passing the name of the shared

No.  This is an OS version issue (ELF platform vs a.out platform).

ELF based linker takes `-soname' as an option which requires one argument
to specify an internal name of the shared library (see ld(1) on ELF-based FreeBSD).
On the other hand, a.out based linker does not have an option `-soname' and
ignores `-soname' from command arguments, then takes the next argument
`libbz2.so.1' as an file name of an existing library or object to link with
the ld-output specifed by `-o' option.

> object being built to the linker as an option.  Can't work, doesn't
> exist yet.  And wouldn't make much sense even if it did.


> *** -patch-aa	Tue Oct  2 17:10:46 2001
> --- patch-aa	Tue Oct  2 17:11:32 2001
> ***************
> *** 40,46 ****
>    	fi
   
>   +libbz2.so.1: $(SO_OBJS)
> ! +	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1 $(SO_OBJS)
>   +	ln -sf libbz2.so.1 libbz2.so
>   +
>    test: bzip2
> --- 40,46 ----
>    	fi
   
>   +libbz2.so.1: $(SO_OBJS)
> ! +	$(CC) -shared -Wl,-soname -o libbz2.so.1 $(SO_OBJS)
>   +	ln -sf libbz2.so.1 libbz2.so
>   +
>    test: bzip2

> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

So, this change will not work on ELF based FreeBSD (3-STABLE and later).
One workaround is change this line to,

	$(CC) -shared -Wl,-soname=libbz2.so.1 -o libbz2.so.1 $(SO_OBJS)

which will work on both platforms.

-- 
Tetsurou

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?lxzo78x54x.wl>