Ticket #192 (closed defect: fixed)

Opened 1 year ago

Last modified 4 months ago

configure.in assumes gcc / autogen.sh assumes GNU which

Reported by: magne Assigned to: pramsey
Priority: major Milestone: 3.1.0
Component: Build/Install Version: svn-trunk
Severity: Unassigned Keywords: solaris
Cc:

Description (Last modified by mloskot)

When building for OpenSolaris? with the Sun Studio compiler suite, a couple of issues with the configure scripts emerged.

1. In autogen.sh, the existence of libtoolize is checked by using which(1). Solaris 'which' prints error message ("No such file ..") to standard out instead of standard error, so this procedure fails. Testing with -x may be an approach that is more portable :

  for libtoolize in glibtoolize libtoolize; do
    LIBTOOLIZE=`which $libtoolize 2>/dev/null`
    if test -x "$LIBTOOLIZE"; then
        break;
    fi
  done

2. In configure.in, additional CFLAGS are appended :

CXXFLAGS="${CXXFLAGS} -Wall -ansi -pedantic -Wno-long-long"
CFLAGS="${CFLAGS} -Wall -ansi -pedantic -Wno-long-long"

Since these are gcc'isms, compilation with other compilers fails. I think there is a portable autoconf macro for adding pedantic/all-warning somewhere.. Otherwise, a test based on uname(1) or a small compilation test macro should solve the problem.

Change History

07/15/08 11:04:24 changed by mloskot

  • keywords set to solaris.
  • version set to svn-trunk.
  • milestone set to 3.0.1.

07/15/08 11:05:02 changed by mloskot

  • owner set to mloskot.
  • status changed from new to assigned.

07/26/08 15:48:59 changed by mloskot

  • description changed.

07/26/08 15:58:56 changed by mloskot

Magne,

I've submitted your fix for autogen.sh to trunk (r2138).

Unfortunately, the second part of your report is unclear to me. Could you explain

  • what compiler you are using on Solaris
  • what flags from the configure.in are incompatible with your compiler
  • what are Solaris equivalents of GCC flags that are incompatible.

Thanks for any details

01/12/09 20:41:43 changed by

  • milestone deleted.

Milestone 3.0.1 deleted

01/12/09 20:58:52 changed by pramsey

  • owner changed from mloskot to pramsey.
  • status changed from assigned to new.
  • milestone set to 3.1.0.

01/18/09 17:31:21 changed by pramsey

Can you point to that autoconf macro? I'm feeling too lazy to solve this one in full. Perhaps you can find a snippet at Google code we can use...

01/18/09 19:32:28 changed by pramsey

#224 also includes the problem with flags. The fix appears to be something of a hack though, as autoconf doesn't seem to distinguish compiler types so much, just the names (cc, gcc, etc).

01/19/09 15:46:39 changed by pramsey

  • status changed from new to closed.
  • resolution set to fixed.

This particular fix is in, at r2248. I still can't even begin to build in Sun Studio though, it's like libtool just doesn't recognize it.

03/17/09 12:33:40 changed by

  • milestone deleted.

Milestone 3.1.0 deleted

03/18/09 11:57:33 changed by pramsey

  • milestone set to 3.1.0.