Date: Fri, 21 Sep 2012 14:01:42 GMT From: Oliver Hartmann <ohartman@zedat.fu-berlin.de> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/171849: databases/postgis: port switches compiler! GCC -> CLANG if world has CLANG enabled and build of port is forced to use USE_GCC=4.6+ Message-ID: <201209211401.q8LE1gg2043979@red.freebsd.org> Resent-Message-ID: <201209211410.q8LEA92p007248@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 171849 >Category: ports >Synopsis: databases/postgis: port switches compiler! GCC -> CLANG if world has CLANG enabled and build of port is forced to use USE_GCC=4.6+ >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 21 14:10:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Oliver Hartmann >Release: FreeBSD 10.0-CURRENT/FreeBSD 9.1-PRE amd64 CLANG buildworld >Organization: FU Berlin >Environment: Ports: Working Copy Root Path: /usr/ports URL: http://svn.freebsd.org/ports/head Repository Root: http://svn.freebsd.org/ports Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 Revision: 304454 Node Kind: directory Schedule: normal Last Changed Author: rakuco Last Changed Rev: 304454 Last Changed Date: 2012-09-18 20:57:00 +0200 (Di, 18 Sep 2012) OS's: FreeBSD 9.1-PRERELEASE #0 r240772: Fri Sep 21 12:14:56 CEST 2012 FreeBSD 10.0-CURRENT #0 r240745: Thu Sep 20 13:11:04 CEST 2012 >Description: Port databases/postgis doesn't compile with CLANG, so setting USE_GCC=4.6+ should build the port avoiding CLANG. but port switches compiler by force: [...] gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -c -o vsprintf.o vsprintf.c gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -c -o g_box.o g_box.c gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -c -o g_coord.o g_coord.c gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -c -o g_geometry.o g_geometry.c gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -c -o g_ptarray.o g_ptarray.c gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -c -o g_serialized.o g_serialized.c g_serialized.c: In function 'gserialized_calculate_gbox_geocentric_from_polygon': g_serialized.c:969:6: warning: variable 'npoints0' set but not used [-Wunused-but-set-variable] g_serialized.c: In function 'gserialized_to_string': g_serialized.c:1165:6: warning: variable 'result' set but not used [-Wunused-but-set-variable] gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -c -o g_util.o g_util.c gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -c -o lwgeodetic.o lwgeodetic.c gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -c -o lwtree.o lwtree.c gcc46 -O3 -pipe -march=native -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -DPIC -Wall -Wmissing-prototypes -ffloat-store -c -o lwspheroid.o lwspheroid.c ar rs liblwgeom.a measures.o box2d.o ptarray.o lwgeom_api.o lwgeom.o lwpoint.o lwline.o lwpoly.o lwmpoint.o lwmline.o lwmpoly.o lwcollection.o lwcircstring.o lwcompound.o lwcurvepoly.o lwmcurve.o lwmsurface.o lwutil.o lwalgorithm.o lwgunparse.o lwgparse.o lwsegmentize.o wktparse.tab.o lex.yy.o vsprintf.o g_box.o g_coord.o g_geometry.o g_ptarray.o g_serialized.o g_util.o lwgeodetic.o lwtree.o lwspheroid.o ar: warning: creating liblwgeom.a gmake[2]: Leaving directory `/usr/ports/databases/postgis/work/postgis-1.5.3/liblwgeom' /usr/local/bin/gmake -C postgis gmake[2]: Entering directory `/usr/ports/databases/postgis/work/postgis-1.5.3/postgis' clang-cpp -traditional-cpp postgis.sql.in.c | grep -v '^#' > postgis.sql.in postgis.sql.in.c:269:5: warning: missing terminating ' character [-Winvalid-pp-token] AS 'SELECT affine($1, $4, 0, 0, 0, $5, 0, ^ postgis.sql.in.c:270:33: warning: missing terminating ' character [-Winvalid-pp-token] 0, 0, 1, $2 * $4, $3 * $5, 0)' ^ postgis.sql.in.c:276:5: warning: missing terminating ' character [-Winvalid-pp-token] AS 'SELECT affine($1, $4, 0, 0, 0, $5, 0, [...] clang -O3 -pipe -march=native -O3 -funroll-loops -fno-strict-aliasing -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I../liblwgeom -I. -I. -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -I/usr/local/include -c -o lwgeom_inout.o lwgeom_inout.c clang -O3 -pipe -march=native -O3 -funroll-loops -fno-strict-aliasing -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include -I../liblwgeom -I. -I. -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include -I/usr/local/include -c -o lwgeom_estimate.o lwgeom_estimate.c lwgeom_estimate.c:318:3: error: use of undeclared identifier 'Form_pg_class' Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple); ^ lwgeom_estimate.c:319:17: error: use of undeclared identifier 'reltup' num1_tuples = reltup->reltuples; ^ lwgeom_estimate.c:330:3: error: use of undeclared identifier 'Form_pg_class' Form_pg_class reltup = (Form_pg_class) GETSTRUCT(class_tuple); ^ lwgeom_estimate.c:331:17: error: use of undeclared identifier 'reltup' num2_tuples = reltup->reltuples; ^ 4 errors generated. gmake[2]: *** [lwgeom_estimate.o] Error 1 gmake[2]: Leaving directory `/usr/ports/databases/postgis/work/postgis-1.5.3/postgis' gmake[1]: *** [postgis] Error 2 gmake[1]: Leaving directory `/usr/ports/databases/postgis/work/postgis-1.5.3' gmake: *** [all] Error 2 *** [do-build] Error code 1 Stop in /usr/ports/databases/postgis. *** [build] Error code 1 Stop in /usr/ports/databases/postgis. ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20120921-8901-147r359 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=postgis-1.5.3_2 UPGRADE_PORT_VER=1.5.3_2 make ** Fix the problem and try again. ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! databases/postgis (postgis-1.5.3_2) (unknown build error) >How-To-Repeat: Have FreeBSD 10/9.1 built with CLANG and set /etc/make.conf properly to build eveything with CLANG. Have either a file /usr/local/etc/ports.conf which contains # databases/postgis .if ${.CURDIR:M*/databases/postgis} USE_GCC= 4.6+ #CC= cc #CXX= c++ #CPP= cpp .endif or manipulate databases/postgis/Makefile adding USE_GCC=4.6+ Try to compile the port and watch ghost switching compiler (due to misrespecting CPP?) >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209211401.q8LE1gg2043979>