NetBSD Problem Report #52556

From www@NetBSD.org  Tue Sep 19 08:46:32 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7BD347A21F
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 19 Sep 2017 08:46:32 +0000 (UTC)
Message-Id: <20170919084631.AE7247A270@mollari.NetBSD.org>
Date: Tue, 19 Sep 2017 08:46:31 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: graphics/libimagequant fails to build on Solaris 11 with GCC 4.9.4
X-Send-Pr-Version: www-1.0

>Number:         52556
>Category:       pkg
>Synopsis:       graphics/libimagequant fails to build on Solaris 11 with GCC 4.9.4
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 19 08:50:00 +0000 2017
>Last-Modified:  Mon Sep 25 07:30:00 +0000 2017
>Originator:     Joern Clausen
>Release:        
>Organization:
University of Bielefeld
>Environment:
>Description:
Compiling graphics/libimagequant on Solaris 11.3/i86 with GCC 4.9.4 fails with

=> Replacing sh interpreter in configure.
warning: unknown switch '--without-openmp' (see ./configure --help for the list)

ld: fatal: bad section layout: .SUNW_ldynsym must precede and be adjacent to .dynsym
collect2: error: ld returned 1 exit status
  Compiler: error ... gcc failed to compile anything (make sure it's installed and supports C99)

*** Error code 1


As for the warning: "--with-openmp=static" seems to be the only configure option available.

As for the error: no idea...
>How-To-Repeat:

>Fix:

>Audit-Trail:
From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/52556: graphics/libimagequant fails to build on Solaris 11
 with GCC 4.9.4
Date: Sat, 23 Sep 2017 10:46:30 +0000

 I think this error comes from solaris ld.
 Can you mention the output at the end (which command failed)?

 THanks.

From: =?UTF-8?Q?J=c3=b6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52556: graphics/libimagequant fails to build on Solaris 11
 with GCC 4.9.4
Date: Mon, 25 Sep 2017 09:26:12 +0200

 There's no more to see:

 => Replacing sh interpreter in configure.
 warning: unknown switch '--without-openmp' (see ./configure --help for 
 the list)

 ld: fatal: bad section layout: .SUNW_ldynsym must precede and be 
 adjacent to .dynsym
 collect2: error: ld returned 1 exit status
    Compiler: error ... gcc failed to compile anything (make sure it's 
 installed and supports C99)

 *** Error code 1

 Stop.
 bmake[1]: stopped in /opt/pkgsrc/pkg-hrz/pkgsrc/graphics/libimagequant
 *** Error code 1

 Stop.
 bmake: stopped in /opt/pkgsrc/pkg-hrz/pkgsrc/graphics/libimagequant


 The problem is this code from the configure script:

 if ! echo "int main(){}" | "$CC" -xc -std=c99 -o /tmp/gcccheck - > 
 /dev/null; then

 Compiling from a pipe does not seem to work:

 $ echo "int main(){}" | gcc -xc -o /tmp/gcccheck -
 ld: fatal: bad section layout: .SUNW_ldynsym must precede and be 
 adjacent to .dynsym

 And it is indeed the linker:

 $ echo "int main(){}" | gcc -xc -c -o /tmp/gcccheck -

 succeeds.

 So this change to the configure script fixes the package for me:

 --- work.pkgsrc-sol11i86/libimagequant-2.10.2/configure.pkgsrc  Mon Sep 
 25 09:22:32 2017
 +++ work.pkgsrc-sol11i86/libimagequant-2.10.2/configure Mon Sep 25 
 09:23:15 2017
 @@ -124,7 +124,7 @@
   fi

   # /tmp, because mingw has problems opening /dev/null and gives false 
 negative
 -if ! echo "int main(){}" | "$CC" -xc -std=c99 -o /tmp/gcccheck - > 
 /dev/null; then
 +if ! echo "int main(){}" | "$CC" -c -xc -std=c99 -o /tmp/gcccheck - > 
 /dev/null; then
       error "Compiler" "$CC failed to compile anything (make sure it's 
 installed and supports C99)"
   fi


 The actual build never uses GCC in a pipe.

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 BITS - Bielefelder IT-Servicezentrum

 Universität Bielefeld
 Universitätsstraße 25
 33615 Bielefeld
 Telefon: +49 521 106-12601
 E-Mail: joern.clausen@uni-bielefeld.de

 http://www.uni-bielefeld.de/bits

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.