On Tue, 20 Aug 2013, Stuart Henderson wrote:
> looks like this is fallout from the change to enable cmake's built-in ELF
> parsing,
> this is responsible for many of the following failures on arm,
>
> E=lang/luajit lang/nqp x11/ede/lib x11/gnustep/libobjc2 devel/libofx
> graphics/ctl lang/spidermonkey www/squid databases/kyotocabinet lang/gfortran
> textproc/clucene security/libssh textproc/source-highlight lang/rubinius
> devel/physfs audio/openal audio/musepack geo/geos devel/libev devel/libyajl
> audio/taglib
>
> I think this one came from libssh,
>
> (gdb) bt
> #0 0x002222ec in cmELF::cmELF ()
> #1 0x0009d898 in cmSystemTools::GuessLibrarySOName ()
> #2 0x003347ec in cmOrderDirectories::AddRuntimeLibrary ()
> #3 0x001f45c4 in cmComputeLinkInformation::AddLibraryRuntimeInfo ()
> #4 0x001fc404 in cmComputeLinkInformation::AddItem ()
> #5 0x001fd578 in cmComputeLinkInformation::Compute ()
> #6 0x000b68f4 in cmTarget::GetLinkInformation ()
> #7 0x000d342c in checkInterfacePropertyCompatibility<bool> ()
> #8 0x000b6110 in cmTarget::GetLinkInterfaceDependentBoolProperty ()
> #9 0x002d2a74 in cmLocalGenerator::AddCMP0018Flags ()
> #10 0x00123a30 in cmNinjaTargetGenerator::ComputeFlagsForObject ()
> #11 0x001296c0 in cmNinjaTargetGenerator::WriteObjectBuildStatement ()
> #12 0x0012b494 in cmNinjaTargetGenerator::WriteObjectBuildStatements ()
> #13 0x001370a8 in cmNinjaNormalTargetGenerator::Generate ()
> #14 0x0012086c in cmLocalNinjaGenerator::Generate ()
> #15 0x00291ea8 in cmGlobalGenerator::Generate ()
> #16 0x0011919c in cmGlobalNinjaGenerator::Generate ()
> #17 0x000f4a30 in cmake::Generate ()
> #18 0x000fcc54 in cmake::Run ()
> #19 0x0000ffb8 in $a ()
> #20 0x0000ffb8 in $a ()
>
> disabling ninja doesn't help. machine is building release packages so
> I don't really want to stop it to make a debug build of cmake right now..
Here's where it explodes:
into Source/cmSystemTools.cxx, starting from line 2378:
//----------------------------------------------------------------------------
bool cmSystemTools::GuessLibrarySOName(std::string const& fullPath,
std::string& soname)
{
// For ELF shared libraries use a real parser to get the correct
// soname.
#if defined(CMAKE_USE_ELF_PARSER)
cmELF elf(fullPath.c_str());
if(elf)
{
return elf.GetSOName(soname);
}
#endif
...
Probably something fishy in the arm toolchain.
The diff below disables elf parsing on arm:
Index: patches/patch-Source_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/devel/cmake/patches/patch-Source_CMakeLists_txt,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-Source_CMakeLists_txt
--- patches/patch-Source_CMakeLists_txt 25 Jun 2013 07:16:46 -0000 1.3
+++ patches/patch-Source_CMakeLists_txt 20 Aug 2013 09:17:00 -0000
@@ -13,9 +13,11 @@ OpenBSD provides ELF ABI declarations in
Teach the platform check and cmELF implementation to use these.
---- Source/CMakeLists.txt.orig Wed May 15 19:38:13 2013
-+++ Source/CMakeLists.txt Fri Jun 21 09:15:02 2013
-@@ -11,7 +11,11 @@
+XXX: broken on arm
+
+--- Source/CMakeLists.txt.orig Tue Jul 2 15:41:40 2013
++++ Source/CMakeLists.txt Tue Aug 20 10:40:55 2013
+@@ -11,8 +11,13 @@
#=============================================================================
include(CheckIncludeFile)
# Check if we can build support for ELF parsing.
@@ -26,5 +28,7 @@ Teach the platform check and cmELF imple
+ CHECK_INCLUDE_FILE("elf.h" HAVE_ELF_H)
+endif()
if(HAVE_ELF_H)
++if(HAVE_ELF_H AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
set(CMAKE_USE_ELF_PARSER 1)
else()
+ set(CMAKE_USE_ELF_PARSER)
Index: patches/patch-bootstrap
===================================================================
RCS file: /cvs/ports/devel/cmake/patches/patch-bootstrap,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-bootstrap
--- patches/patch-bootstrap 28 Jun 2013 14:58:23 -0000 1.3
+++ patches/patch-bootstrap 20 Aug 2013 09:17:00 -0000
@@ -1,15 +1,20 @@
$OpenBSD: patch-bootstrap,v 1.3 2013/06/28 14:58:23 dcoppa Exp $
Use Ninja to build CMake
+XXX: broken on arm
---- bootstrap.orig Thu Jun 27 11:26:07 2013
-+++ bootstrap Thu Jun 27 11:26:31 2013
-@@ -112,7 +112,7 @@ if ${cmake_system_mingw}; then
+--- bootstrap.orig Tue Jul 2 15:41:41 2013
++++ bootstrap Tue Aug 20 10:55:10 2013
+@@ -112,7 +112,11 @@ if ${cmake_system_mingw}; then
cmake_bootstrap_generator="MSYS Makefiles"
else
# Bootstrapping from a standard UNIX prompt.
- cmake_bootstrap_generator="Unix Makefiles"
-+ cmake_bootstrap_generator="Ninja"
++ if arch -s | grep ^arm >/dev/null 2>&1; then
++ cmake_bootstrap_generator="Unix Makefiles"
++ else
++ cmake_bootstrap_generator="Ninja"
++ fi
fi
# Choose tools and extensions for this platform.
What's the right way to disable USE_NINJA on arm?
cause ninja does not work without the ELF parser.
Ciao,
David