Bug 176743 - building audio/mpg123 fails
Summary: building audio/mpg123 fails
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Roman Bogorodskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-08 07:10 UTC by TsurutaniNaoki
Modified: 2013-03-12 17:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TsurutaniNaoki 2013-03-08 07:10:00 UTC
	building audio/mpg123 fails only on i386 (not on amd86).

Fix: 

i have no idea.
	".libs/dct64_i386.o" appears twice in the list. i think this might be
	the reason.
How-To-Repeat: 	gnome-libtool: link: mv -f ".libs/libmpg123.expT" ".libs/libmpg123.exp"
	gnome-libtool: link: cc -shared  -fPIC -DPIC  .libs/compat.o .libs/parse.o .libs/frame.o .libs/format.o .libs/dct64.o .libs/equalizer.o .libs/id3.o .libs/optimize.o .libs/readers.o .libs/tabinit.o .libs/libmpg123.o .libs/index.o .libs/stringbuf.o .libs/icy.o .libs/icy2utf8.o .libs/ntom.o .libs/synth.o .libs/synth_8bit.o .libs/layer1.o .libs/layer2.o .libs/layer3.o .libs/synth_s32.o .libs/synth_real.o .libs/dct64_i386.o .libs/synth_i586.o .libs/dct64_i386.o .libs/synth_3dnow.o .libs/dct64_3dnow.o .libs/equalizer_3dnow.o .libs/dct36_3dnow.o .libs/getcpuflags.o .libs/feature.o .libs/lfs_alias.o   -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib /usr/local/lib/libltdl.so -lm  -O   -Wl,-soname -Wl,libmpg123.so.0 -Wl,-retain-symbols-file -Wl,.libs/libmpg123.exp -o .libs/libmpg123.so.0
	.libs/dct64_i386.o(.text+0x0): In function `INT123_dct64_i386':
	: multiple definition of `INT123_dct64_i386'
	.libs/dct64_i386.o(.text+0x0): first defined here
	*** Error code 1

	Stop in /usr/local/work/usr/ports/audio/mpg123/work/mpg123-1.15.1/src/libmpg123.
	*** Error code 1

	Stop in /usr/local/work/usr/ports/audio/mpg123/work/mpg123-1.15.1/src.
	*** Error code 1

	Stop in /usr/local/work/usr/ports/audio/mpg123/work/mpg123-1.15.1/src.
	*** Error code 1

	Stop in /usr/local/work/usr/ports/audio/mpg123/work/mpg123-1.15.1.
	*** Error code 1

	Stop in /usr/ports/audio/mpg123.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-03-08 07:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->novel

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Roman Bogorodskiy freebsd_committer freebsd_triage 2013-03-08 07:47:50 UTC
State Changed
From-To: open->feedback

I wasn't able to reproduce that on -CURRENT/i386. Could 
you please tar up working directory and send it to me?
Comment 3 olli 2013-03-11 14:55:40 UTC
I had exactly the same problem.  This is FreeBSD 8 on i386,
too. The complete output from "make" and a tarball of the
work directory can be found here:

http://www.secnetix.de/olli/tmp/mpg123/

As you can see, there are a lot of error messages from the
test(1) builtin of sh(1).  Upon further inspection it turns
out that the older version of sh(1) in FreeBSD 8 does not
support the "==" operator in the test(1) builtin.  So I've
created a patch that replaces it with "=" in the configure
script.  With this patch, the port builds fine.

The patch should work with all versions of FreeBSD.  You can
find it at the same URL above.  I've also appended it below,
although GNATS might mangle it.

Best regards
   Oliver



--- configure.orig	2013-02-23 21:58:36.000000000 +0100
+++ configure	2013-03-11 15:39:07.000000000 +0100
@@ -15895,7 +15895,7 @@
   # Is local not POSIX sh?
   for given_word in "$@"
   do
-    if test "x$word" == "x$given_word"; then
+    if test "x$word" = "x$given_word"; then
       return 0
     fi
   done
@@ -16097,7 +16097,7 @@
 		# QSA and ALSA are not distinguishable in these tests, need to block
 		# each other and play with test order depending on platform.
 		alsa)
-			if test "x$HAVE_QSA" == xyes; then
+			if test "x$HAVE_QSA" = xyes; then
 				HAVE_ALSA=no
 			else
 
@@ -16160,7 +16160,7 @@
 			fi # HAVE_QSA
 		;;
 		qsa)
-			if test "x$HAVE_ALSA" == xyes; then
+			if test "x$HAVE_ALSA" = xyes; then
 				HAVE_QSA=no
 			else
 



-- 
Oliver Fromme,  secnetix GmbH & Co. KG,  Marktplatz 29, 85567 Grafing
Handelsregister:  Amtsgericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsreg.: Amtsgericht München,
HRB 125758, Geschäftsführer:  Maik Bachmann,  Olaf Erb,  Ralf Gebhart

FreeBSD-Dienstleistungen/-Produkte + mehr: http://www.secnetix.de/bsd

"The most important decision in [programming] language design
concerns what is to be left out."  --  Niklaus Wirth
Comment 4 TsurutaniNaoki 2013-03-12 09:31:35 UTC
Hi,

Thank you for your reply.

It seems to be fine.  Great.
I also checked word_in_list() in configure, but I used bash instead of sh...

Sincerely,

Oliver Fromme <olli@grabthar.secnetix.de> wrote:

> I had exactly the same problem.  This is FreeBSD 8 on i386,
> too. The complete output from "make" and a tarball of the
> work directory can be found here:
> 
> http://www.secnetix.de/olli/tmp/mpg123/
> 
> As you can see, there are a lot of error messages from the
> test(1) builtin of sh(1).  Upon further inspection it turns
> out that the older version of sh(1) in FreeBSD 8 does not
> support the "==" operator in the test(1) builtin.  So I've
> created a patch that replaces it with "=" in the configure
> script.  With this patch, the port builds fine.
> 
> The patch should work with all versions of FreeBSD.  You can
> find it at the same URL above.  I've also appended it below,
> although GNATS might mangle it.
> 
> Best regards
>    Oliver
> 
> 
> 
> --- configure.orig	2013-02-23 21:58:36.000000000 +0100
> +++ configure	2013-03-11 15:39:07.000000000 +0100
> @@ -15895,7 +15895,7 @@
>    # Is local not POSIX sh?
>    for given_word in "$@"
>    do
> -    if test "x$word" == "x$given_word"; then
> +    if test "x$word" = "x$given_word"; then
>        return 0
>      fi
>    done
> @@ -16097,7 +16097,7 @@
>  		# QSA and ALSA are not distinguishable in these tests, need to block
>  		# each other and play with test order depending on platform.
>  		alsa)
> -			if test "x$HAVE_QSA" == xyes; then
> +			if test "x$HAVE_QSA" = xyes; then
>  				HAVE_ALSA=no
>  			else
>  
> @@ -16160,7 +16160,7 @@
>  			fi # HAVE_QSA
>  		;;
>  		qsa)
> -			if test "x$HAVE_ALSA" == xyes; then
> +			if test "x$HAVE_ALSA" = xyes; then
>  				HAVE_QSA=no
>  			else
>  
> 
> 
> 
> -- 
> Oliver Fromme,  secnetix GmbH & Co. KG,  Marktplatz 29, 85567 Grafing
> Handelsregister:  Amtsgericht Muenchen, HRA 74606, Gesch$BgG(Btsfuehrung:
> secnetix Verwaltungsgesellsch. mbH, Handelsreg.: Amtsgericht M$B!&(Bchen,
> HRB 125758, Gesch$BgG(Btsf$B!&(Brer:  Maik Bachmann,  Olaf Erb,  Ralf Gebhart
> 
> FreeBSD-Dienstleistungen/-Produkte + mehr: http://www.secnetix.de/bsd
> 
> "The most important decision in [programming] language design
> concerns what is to be left out."  --  Niklaus Wirth
>
Comment 5 Roman Bogorodskiy 2013-03-12 16:38:44 UTC
  Tsurutani Naoki wrote:

> Hi,
> 
> Thank you for your reply.
> 
> It seems to be fine.  Great.
> I also checked word_in_list() in configure, but I used bash instead of sh...


I have committed the patch for configure.

Thanks!

Roman Bogorodskiy
Comment 6 Roman Bogorodskiy freebsd_committer freebsd_triage 2013-03-12 17:40:47 UTC
State Changed
From-To: feedback->closed

Fix committed.