Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#192 closed defect (fixed)

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

Reported by: magne Owned by: pramsey
Priority: major Milestone: 3.1.0
Component: Build/Install Version: main
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
    
  1. 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 (11)

comment:1 by mloskot, 16 years ago

Keywords: solaris added
Milestone: 3.0.1
Version: svn-trunk

comment:2 by mloskot, 16 years ago

Owner: set to mloskot
Status: newassigned

comment:3 by mloskot, 16 years ago

Description: modified (diff)

comment:4 by mloskot, 16 years ago

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

comment:5 by (none), 15 years ago

Milestone: 3.0.1

Milestone 3.0.1 deleted

comment:6 by pramsey, 15 years ago

Milestone: 3.1.0
Owner: changed from mloskot to pramsey
Status: assignednew

comment:7 by pramsey, 15 years ago

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...

comment:8 by pramsey, 15 years ago

#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).

comment:9 by pramsey, 15 years ago

Resolution: fixed
Status: newclosed

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.

comment:10 by (none), 15 years ago

Milestone: 3.1.0

Milestone 3.1.0 deleted

comment:11 by pramsey, 15 years ago

Milestone: 3.1.0
Note: See TracTickets for help on using tickets.