cpputest latest and clang 9

180 views
Skip to first unread message

James Grenning

unread,
Jan 20, 2018, 4:07:05 PM1/20/18
to cpputest
Is it just me or is cpputest not building for 'Apple LLVM version 9.0.0 (clang-900.0.39.2)'

For 3.8 I could do this:

./configure
make tdd

For cpputest latest (mac 10.12.6, after a 'brew install automake') I get an error in the first step


$ autoreconf . -i
configure
.ac:10: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
     
If this token and others are legitimate, please use m4_pattern_allow.
     
See the Autoconf documentation.
configure
.ac:11: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf
: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1

If I try to configure anyway, I get this:

./configure
[... cut out a bunch of normal output ...]
checking whether LD supports
-Wl,-map... yes
checking
for the availability of gmock via the GMOCK_HOME variable... ./configure: line 7476: LT_INIT: command not found
checking that generated files are newer than configure
... done
configure
: creating ./config.status
config
.status: creating cpputest.pc
config
.status: error: cannot find input file: `Makefile.in'

Any idea what is wrong? 

James

Heath Raftery

unread,
Jan 20, 2018, 6:10:52 PM1/20/18
to cppu...@googlegroups.com
FWIW, I didn’t have these troubles with latest everything:

brew install automake
cd cpputest/cpputest_build
autoreconf .. -i
../configure
CC=clang CXX=clang++ ../configure
make tdd


autoreconf runs for a long time but returns nothing. configure returns all the usual guff and succeeds, and then setting clang as the compiler does the same except with clang as the compiler. make tdd succeeds, finally outputting the results of CppUTestTests and CppUTestExtTests.

autoconf is also v2.69.

Heath

--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Grenning

unread,
Jan 22, 2018, 12:12:05 PM1/22/18
to cppu...@googlegroups.com

Thanks Heath

Something is odd. Here is my clang info

~/repos/github/cpputest $ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I had to make some changes to configure.ac. I know nothing about this, but following the errors I added AC_PROG_RANLIB and commented out

# AC_LIBTOOL_DLOPEN
# AC_PROG_LIBTOOL

After that, these commands operated as they should.

cd cpputest
./autoreconf . -I
./configure
Make add

I'd do a pull request if I know what to change that would not break other platforms.

Thanks again, James

Heath Raftery

unread,
Jan 22, 2018, 2:35:38 PM1/22/18
to cppu...@googlegroups.com
Hmm, it could be my setup that is odd. Who knows what I’ve changed over the years. In fact, even my gcc is non-standard:

[515:~/Programming/cpputest/cpputest/cpputest_build] liteyear$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin15.0.0/5.3.0/lto-wrapper
Target: x86_64-apple-darwin15.0.0
Configured with: ../gcc-5.3.0/configure --enable-languages=fortran,c,c++
Thread model: posix
gcc version 5.3.0 (GCC) 

But my clang is similar:

[516:~/Programming/cpputest/cpputest/cpputest_build] liteyear$ clang -v
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

The dyld parts of the configure output don’t give many clues:

checking whether the clang linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.3.0 dyld
checking how to hardcode library paths into programs... immediate
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes

and ld itself:

[518:~/Programming/cpputest/cpputest/cpputest_build] liteyear$ /Library/Developer/CommandLineTools/usr/bin/ld -v
@(#)PROGRAM:ld  PROJECT:ld64-305
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: LLVM version 9.0.0, (clang-900.0.39.2) (static support for 21, runtime is 21)
TAPI support using: Apple TAPI version 900.0.15 (tapi-900.0.15)

I do have another version of ld installed with homebrew so I don’t know if that’s making an impact. It doesn’t seem much different:

[520:~/Programming/cpputest/cpputest/cpputest_build] liteyear$ which ld
/opt/local/bin/ld
[521:~/Programming/cpputest/cpputest/cpputest_build] liteyear$ ld -v
@(#)PROGRAM:ld  PROJECT:ld64-274.2
configured to support archs: i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64 (tvOS)
LTO support using: LLVM version 3.9.1

It certainly seems there’s something different between our libtools, but I don’t know what.

I did see some reference to “top_builddir" at https://ftp.gnu.org/old-gnu/Manuals/libtool-1.4.2/html_node/libtool_27.html and we’re building from different dirs, but I don’t know what the impact is.

Heath
Reply all
Reply to author
Forward
0 new messages