Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#32014 closed defect (fixed)

cln, GiNaC: build fails with clang

Reported by: browntroutstream@… Owned by: gwright@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang Cc: ryandesign (Ryan Carsten Schmidt)
Port: cln

Description

Seems to have a problem with clang

--->  Computing dependencies for cln.
--->  Building cln
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_cln/cln/work/cln-1.3.1'
Making all in src
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_cln/cln/work/cln-1.3.1/src'
/bin/sh ../libtool  --tag=CXX   --mode=compile /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf  -I../include -I../src -I../include -I../src -I/opt/local/include  -pipe -O2 -arch x86_64 -MT cl_rcpointer2_hashweak_rcpointer.lo -MD -MP -MF .deps/cl_rcpointer2_hashweak_rcpointer.Tpo -c -o cl_rcpointer2_hashweak_rcpointer.lo `test -f 'base/hash/cl_rcpointer2_hashweak_rcpointer.cc' || echo './'`base/hash/cl_rcpointer2_hashweak_rcpointer.cc
/bin/sh ../libtool  --tag=CXX   --mode=compile /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf  -I../include -I../src -I../include -I../src -I/opt/local/include  -pipe -O2 -arch x86_64 -MT cl_low_div.lo -MD -MP -MF .deps/cl_low_div.Tpo -c -o cl_low_div.lo `test -f 'base/low/cl_low_div.cc' || echo './'`base/low/cl_low_div.cc
/bin/sh ../libtool  --tag=CXX   --mode=compile /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf  -I../include -I../src -I../include -I../src -I/opt/local/include  -pipe -O2 -arch x86_64 -MT cl_low_isqrt.lo -MD -MP -MF .deps/cl_low_isqrt.Tpo -c -o cl_low_isqrt.lo `test -f 'base/low/cl_low_isqrt.cc' || echo './'`base/low/cl_low_isqrt.cc
/bin/sh ../libtool  --tag=CXX   --mode=compile /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf  -I../include -I../src -I../include -I../src -I/opt/local/include  -pipe -O2 -arch x86_64 -MT cl_low_isqrt2.lo -MD -MP -MF .deps/cl_low_isqrt2.Tpo -c -o cl_low_isqrt2.lo `test -f 'base/low/cl_low_isqrt2.cc' || echo './'`base/low/cl_low_isqrt2.cc
libtool: compile:  /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -I/opt/local/include -pipe -O2 -arch x86_64 -MT cl_low_isqrt2.lo -MD -MP -MF .deps/cl_low_isqrt2.Tpo -c base/low/cl_low_isqrt2.cc  -fno-common -DPIC -o .libs/cl_low_isqrt2.o
libtool: compile:  /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -I/opt/local/include -pipe -O2 -arch x86_64 -MT cl_low_isqrt.lo -MD -MP -MF .deps/cl_low_isqrt.Tpo -c base/low/cl_low_isqrt.cc  -fno-common -DPIC -o .libs/cl_low_isqrt.o
libtool: compile:  /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -I/opt/local/include -pipe -O2 -arch x86_64 -MT cl_rcpointer2_hashweak_rcpointer.lo -MD -MP -MF .deps/cl_rcpointer2_hashweak_rcpointer.Tpo -c base/hash/cl_rcpointer2_hashweak_rcpointer.cc  -fno-common -DPIC -o .libs/cl_rcpointer2_hashweak_rcpointer.o
libtool: compile:  /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -I/opt/local/include -pipe -O2 -arch x86_64 -MT cl_low_div.lo -MD -MP -MF .deps/cl_low_div.Tpo -c base/low/cl_low_div.cc  -fno-common -DPIC -o .libs/cl_low_div.o
base/low/cl_low_isqrt2.cc:42:16:base/low/cl_low_isqrt.cc:42:16 warning: expression result unused [-Wunused-value]
: warning: expression result unused [-Wunused-value]
               divu_6432_3232(x1,x0,y, z=,); // Dividiere x/y (geht, da x/y < 2^(2k)/2^(k-1) = 2^(k+1) <= 2^32)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
               divu_3216_1616(x,y, z=,); // Dividiere x/y (geht, da x/y < 2^(2k)/2^(k-1) = 2^(k+1) <= 2^16)
               ^~~~~~~~~~~~~~~~~~~~~~~~
./base/cl_low.h:722:19: note: instantiated from:
      r_zuweisung __r;                                                  \
                  ^~~
./base/cl_low.h:473:19: note: instantiated from:
      r_zuweisung __r;                                                  \
                  ^~~
base/low/cl_low_isqrt2.cc:54:16: warning: expression result unused [-Wunused-value]
               divu_6432_3232(x1,x0,y, z=,); // Dividiere x/y
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./base/cl_low.h:722:19: note: instantiated from:
      r_zuweisung __r;                                                  \
                  ^~~
base/low/cl_low_isqrt.cc:55:16: warning: expression result unused [-Wunused-value]
               divu_3216_1616(x,y, z=,); // Dividiere x/y
               ^~~~~~~~~~~~~~~~~~~~~~~~
./base/cl_low.h:473:19: note: instantiated from:
      r_zuweisung __r;                                                  \
                  ^~~
base/low/cl_low_isqrt.cc:76:16: warning: expression result unused [-Wunused-value]
               divu_6432_3232(high32(x),low32(x),y, z=,); // z := x/y (works, since x/y < 2^(2k)/2^(k-1) = 2^(k+1) <= 2^32)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./base/cl_low.h:722:19: note: instantiated from:
      r_zuweisung __r;                                                  \
                  ^~~
base/low/cl_low_isqrt.cc:89:16: warning: expression result unused [-Wunused-value]
               divu_6432_3232(high32(x),low32(x),y, z=,); // divide x/y
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./base/cl_low.h:722:19: note: instantiated from:
      r_zuweisung __r;                                                  \
                  ^~~
In file included from base/hash/cl_rcpointer2_hashweak_rcpointer.cc:7:
In file included from ./base/hash/cl_rcpointer2_hashweak_rcpointer.h:8:
In file included from ./base/hash/cl_hash2weak.h:6:
./base/hash/cl_hash2.h:121:13: error: use of undeclared identifier '_garcol_fun'
        if (_garcol_fun(this))
            ^
            this->
./base/hash/cl_hash2.h:77:9: note: in instantiation of member function 'cln::cl_heap_hashtable_2<cln::cl_rcpointer, cln::cl_rcpointer, cln::cl_rcpointer>::prepare_store' requested here
        prepare_store();
        ^
base/hash/cl_rcpointer2_hashweak_rcpointer.cc:47:67: note: in instantiation of member function 'cln::cl_heap_hashtable_2<cln::cl_rcpointer, cln::cl_rcpointer, cln::cl_rcpointer>::put' requested here
        ((cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer)->put(x,y,z);
                                                                         ^
./base/hash/cl_hash.h:36:12: note: must qualify identifier to find this declaration in dependent base class
    bool (*_garcol_fun) (cl_heap*); // Function to make room in the table.
           ^
1 error generated.
make[1]: *** [cl_rcpointer2_hashweak_rcpointer.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile:  /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -I/opt/local/include -pipe -O2 -arch x86_64 -MT cl_low_div.lo -MD -MP -MF .deps/cl_low_div.Tpo -c base/low/cl_low_div.cc -o cl_low_div.o >/dev/null 2>&1
2 warnings generated.
4 warnings generated.
libtool: compile:  /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -I/opt/local/include -pipe -O2 -arch x86_64 -MT cl_low_isqrt2.lo -MD -MP -MF .deps/cl_low_isqrt2.Tpo -c base/low/cl_low_isqrt2.cc -o cl_low_isqrt2.o >/dev/null 2>&1
libtool: compile:  /Developer/usr/bin/clang++ -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -I/opt/local/include -pipe -O2 -arch x86_64 -MT cl_low_isqrt.lo -MD -MP -MF .deps/cl_low_isqrt.Tpo -c base/low/cl_low_isqrt.cc -o cl_low_isqrt.o >/dev/null 2>&1
mv -f .deps/cl_low_div.Tpo .deps/cl_low_div.Plo
mv -f .deps/cl_low_isqrt2.Tpo .deps/cl_low_isqrt2.Plo
mv -f .deps/cl_low_isqrt.Tpo .deps/cl_low_isqrt.Plo
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_cln/cln/work/cln-1.3.1/src'
make: *** [all-recursive] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_cln/cln/work/cln-1.3.1'
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_cln/cln/work/cln-1.3.1" && /usr/bin/make -j4 -w all " returned error 2
Error: Target org.macports.build returned: shell command failed (see log for details)
Warning: the following items did not execute (for cln): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for cln is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_cln/cln/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Change History (5)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Keywords: clang added
Owner: changed from macports-tickets@… to gwright@…
Port: cln added

And does using llvm-gcc-4.2 work?

comment:2 Changed 13 years ago by browntroutstream@…

Yep, that works. Thanks.

It's needed for ginac and cgal as well. Looking through the recent tickets for Lion it appears that this is a common "fix".

comment:3 in reply to:  2 ; Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed
Summary: cln install fails on Lioncln, GiNaC: build fails with clang

Replying to browntroutstream@…:

Yep, that works. Thanks.

Ok, fixed in r87105.

It's needed for ginac

Ok, fixed in r87106.

and cgal as well.

See #31562.

Looking through the recent tickets for Lion it appears that this is a common "fix".

Correct. Many software packages are not ready for the clang compiler. As these are discovered, they can be updated or fixed or made to use a different compiler.

comment:5 in reply to:  3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

Replying to browntroutstream@…:

Yep, that works. Thanks.

Ok, fixed in r87105.

Reverted in r98227 since it's no longer necessary with cln 1.3.2.

comment:6 in reply to:  3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

It's needed for ginac

Ok, fixed in r87106.

Reverted in r98228 since it's no longer necessary as of GiNaC 1.6.0.

Note: See TracTickets for help on using tickets.