Guess, we are too conservative on our check, consideing only clang 5.0: $ head -n1882 configure.ag | tail -n15 case $GCC-$have_pthread-$CC_ver in yes-auto-clang-5.0|yes-yes-clang-5.0) # clang 5.0 (at least on Mac OSX Mavericks) does not # seem to have / require -pthread as compiler # option; on Mac OSX Mavericks, "Apple LLVM version # 5.0 (clang-500.2.79) (based on LLVM 3.3svn)" # complains about "error: argument unused during # compilation: '-pthread'". # However, disabling -pthread completely might be # too redical/harsh; see also # https://www.monetdb.org/pipermail/developers-list/2014-March/004264.html # a better alternative might be required but is # still pending ... ;; yes-auto-*|yes-yes-*) Maybe we need to do all clang 5.* versions or even all clang >= 5.0 (or chanage configure to check whether the option is available, a la MCHECK_ADD_FLAG()) What does your latest clang say with --version? What does youc configure report about "compiler type & version"? Stefan ----- Original Message -----
Bad news everyone, Apple just released an update for Xcode (and clang) that seems break the build again.
As before: libtool: link: gcc -I/usr/local/include -I/usr/local/include -g -I/usr/local/Cellar/libatomic_ops/7.2d/include -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wmissing-include-dirs -Wno-deprecated-declarations -D_REENTRANT -o .libs/tomograph tomograph.o -pthread -L/usr/local/lib ./.libs/libmcutil.a -L/usr/local/Cellar/libatomic_ops/7.2d/lib ../mapilib/.libs/libmapi.dylib -L/usr/local/Cellar/zlib/1.2.8/lib /Users/dnedev/monetdb/MonetDB/BUILD/common/stream/.libs/libstream.dylib ../../common/stream/.libs/libstream.dylib -lbz2 -lssl -lcrypto -lz -liconv -lcurl -latomic_ops -pthread clang: error: argument unused during compilation: '-pthread' clang: error: argument unused during compilation: '-pthread' make[5]: *** [tomograph] Error 1
Dimitar
On 2014-Mar-05, at 18:09 , Dimitar Nedev
wrote: Yep. Latest checkout (@04ac9b8ce9ca) from the Jan2014 branch builds with all default modules without any issues.
Dimitar
On 2014-Mar-05, at 18:01 , Ying Zhang
wrote: On Mar 05, 2014, at 16:51, Stefan Manegold
wrote: Thanks, Jennie!
The problem was actually BSD sed, not BSD grep.
Should be fixed, now ...
Works for me. Thanks, for both fixes! @Dimitar: does it work for you too?
Jennie
Stefan
----- Original Message -----
On Mar 05, 2014, at 15:39, Stefan Manegold
wrote: > configure:6863: checking compiler type & version > configure:6890: result: clang-Apple LLVM version 5.0 (clang-500.2.79) > (based > on LLVM 3.3svn)
hm, strange, this means that the "grep&sed-magic" to extract the version number does not work in this case;
in configure[.ag] we do
gcc_ver="`$CC -v 2>&1 | grep -w '[[Vv]]ersion [[0-9]]\+\.[[0-9]]\+' | sed 's|^.*[[Vv]]ersion \([[0-9]]\+\(\.[[0-9]]\+\)\+\).*$|\1|'`" CC_ver="clang-$gcc_ver"
and this appears to work for clang 3.3 on Linux.
Also, it work "by hand" for me:
echo 'Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)' | grep -w '[Vv]ersion [0-9]\+\.[0-9]\+' | sed 's|^.*[Vv]ersion \([0-9]\+\(\.[0-9]\+\)\+\).*$|\1|' 5.0
Not for me:
$ echo 'Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)' | grep -w '[Vv]ersion [0-9]\+\.[0-9]\+' | sed 's|^.*[Vv]ersion \([0-9]\+\(\.[0-9]\+\)\+\).*$|\1|'
$ echo 'Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)' | grep -w '[Vv]ersion [0-9]\+\.[0-9]\+'
$ echo 'Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)' | grep -w '[Vv]ersion' Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
$ grep --version grep (BSD grep) 2.5.1-FreeBSD
But this should not be a problem (for now), since all relevant checks only rely on whether we reconized it's clang (which we did), rather than knowing the exact clang version.
> No mention of "recognized", but I did find the following:
Good, this means that out configure did "recognize" the compiler (i.e., it does not warn about not recognizing it)
> configure:18985: checking whether we have pthread support > configure:18992: result: yes: -pthread
This means that we indeed did recognized clang and thus set only PTHREAD_LIBS="-pthread", but not PTHREAD_INCS="-pthread". Setting PTHREAD_LIBS="-pthread" is required for clang 3.3 on Linux.
This also means that setting PTHREAD_LIBS="-pthread" is "still too much" (at least) for clang 5.0 on Mac OSX Mavericks.
Thus, we need to debug and fix the clang version number extraction (see above), and then disable both PTHREAD_INCS="-pthread" & PTHREAD_LIBS="-pthread" (only) for clang-5.0 .
Maybe someone else has any idea, which the clang version number extraction (see above) does not work for Dimitar (i.e., on Mac OSX Mavericks)?
For the time being, maybe you can try the attached patch for configure.ag ?
Your patch seems helping. Compilation at least continues, although it hits another error:
.../monetdb5/modules/mal/mal_mapi.c:321:5: error: will never be executed [-Werror,-Wunreachable-code] break; ^~~~~
but this is easy to fix, I think.
Jennie
Stefan
> On 2014-Mar-05, at 13:46 , Stefan Manegold
> wrote: > >> >> What does your configure output say, >> in particular look for "compiler type & version" and "recognized" >> >> Stefan >> >> >> ----- Original Message ----- >>> Unfortunately I still get an error even with the latest changes: >>> >>> libtool: link: gcc -g -I/opt/local/include -Werror -Wall -Wextra -W >>> -Werror-implicit-function-declaration -Wpointer-arith >>> -Wdeclaration-after-statement -Wformat=2 -Wno-format-nonliteral >>> -Winit-self >>> -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute >>> -Wmissing-prototypes -Wold-style-definition -Wpacked >>> -Wunknown-pragmas >>> -Wvariadic-macros -fstack-protector-all -Wstack-protector >>> -Wmissing-include-dirs -Wunreachable-code -D_REENTRANT -o >>> .libs/stethoscope >>> stethoscope.o ./.libs/libmcutil.a -L/opt/local/lib >>> ../mapilib/.libs/libmapi.dylib >>> /Users/dnedev/monetdb/MonetDB/BUILD/common/stream/.libs/libstream.dylib >>> ../../common/stream/.libs/libstream.dylib -lz -lbz2 -lssl -lcrypto >>> -liconv >>> -lcurl -latomic_ops >>> clang: error: argument unused during compilation: '-pthread' >>> clang: error: argument unused during compilation: '-pthread' >>> make[5]: *** [tomograph] Error 1 >>> >>> On 2014-Mar-05, at 10:02 , Dimitar Nedev wrote: >>> >>>> https://en.wikipedia.org/wiki/Xcode#Toolchain_Versions >>>> >>>> +-------+---------+-------+---------+---------+--------------+------------+---------------------------------------------+ >>>> | Xcode | cctools | ld64 | GCC 4.0 | GCC 4.2 | LLVM-GCC 4.2 | >>>> | LLVM >>>> | | >>>> | Apple LLVM/ Apple Clang | >>>> +-------+---------+-------+---------+---------+--------------+------------+---------------------------------------------+ >>>> | 4.6.3 | ? | ? | - | - | 5658 | >>>> | 2336.11.00 >>>> | | >>>> | 4.2 (clang-425.0.28) (based on LLVM 3.2svn) | >>>> | 5.0.0 | 846.2.1 | 224.1 | - | - | - | - >>>> | | >>>> | 5.0 (clang-500.2.75) (based on LLVM 3.3svn) | >>>> | 5.0.1 | 846.2.4 | 224.1 | - | - | - | - >>>> | | >>>> | 5.0 (clang-500.2.79) (based on LLVM 3.3svn) | >>>> | 5.0.2 | 846.2.4 | 224.1 | - | - | - | - >>>> | | >>>> | 5.0 (clang-500.2.79) (based on LLVM 3.3svn) | >>>> +-------+---------+-------+---------+---------+--------------+------------+---------------------------------------------+ >>>> >>>> >>>> On 2014-Mar-05, at 09:27 , Fabian Groffen >>>> wrote: >>>> >>>>> On 05-03-2014 08:25:38 +0100, Stefan Manegold wrote: >>>>>> Changeset: 36afc568f849 for MonetDB >>>>>> URL: >>>>>> http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=36afc568f849 >>>>>> Modified Files: >>>>>> configure.ag >>>>>> Branch: Jan2014 >>>>>> Log Message: >>>>>> >>>>>> configure.ag: revised way to determine compiler type (gcc vs. >>>>>> clang >>>>>> vs. >>>>>> icc): >>>>>> in particular do not (only) rely on the result of AC_PROG_CC() >>>>>> (i.e., >>>>>> $GCC) >>>>>> or the name of the call; >>>>>> background is that on Mac OSX Mavericks, Apple prestends that >>>>>> their >>>>>> clang >>>>>> were gcc ... >>>>> >>>>> FYI: they were pretending they had a GCC since OSX Lion. >>>>> >>>>> Fabian >>>>> _______________________________________________ >>>>> developers-list mailing list >>>>> developers-list@monetdb.org >>>>> https://www.monetdb.org/mailman/listinfo/developers-list >>>> >>>> _______________________________________________ >>>> developers-list mailing list >>>> developers-list@monetdb.org >>>> https://www.monetdb.org/mailman/listinfo/developers-list >>> >>> _______________________________________________ >>> developers-list mailing list >>> developers-list@monetdb.org >>> https://www.monetdb.org/mailman/listinfo/developers-list >>> >> >> -- >> | Stefan.Manegold@CWI.nl | DB Architectures (DA) | >> | www.CWI.nl/~manegold/ | Science Park 123 (L321) | >> | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) | >> >> _______________________________________________ >> developers-list mailing list >> developers-list@monetdb.org >> https://www.monetdb.org/mailman/listinfo/developers-list > > _______________________________________________ > developers-list mailing list > developers-list@monetdb.org > https://www.monetdb.org/mailman/listinfo/developers-list > -- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
<PATCH-configure-clang-pthread>_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |