Opened 9 years ago

Closed 9 years ago

#3803 closed defect (duplicate)

OM Mac build fails

Reported by: Adam Dershowitz Owned by: Martin Sjölund
Priority: high Milestone:
Component: Build Environment Version:
Keywords: Cc: martin.sjolund@…

Description

I just tried to upgrade openmodelica-devel, using Macports, and the build fails immediately after config the config.
The upgrade is to: openmodelica-devel-1.10.0~dev-182-g4c2263c_0

The last part of the log file shows this:

:info:build config.status: executing libtool commands
:info:build config.status: executing default commands
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler'
:info:build make[1]: *** [omc-bootstrapped] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler'
:info:build make: *** [omc] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c" && /usr/bin/make -j8 -w 
:info:build Exit code: 2
:error:build org.macports.build for port openmodelica-devel returned: command execution failed
:debug:build Error code: CHILDSTATUS 98662 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"portbuild::build_main org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for openmodelica-devel: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port openmodelica-devel for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/main.log

But, I will also attach the full log.

Attachments (2)

main.log (2.3 MB ) - added by Adam Dershowitz 9 years ago.
main.2.log (2.3 MB ) - added by Adam Dershowitz 9 years ago.
build log after metis install

Change History (14)

by Adam Dershowitz, 9 years ago

Attachment: main.log added

comment:1 by Martin Sjölund, 9 years ago

That's new:

:info:build make[5]: *** [programs/gpmetis] Error 1
:info:build make[5]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0'
:info:build make[4]: *** [programs/CMakeFiles/gpmetis.dir/all] Error 2
:info:build make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0'
:info:build make[3]: *** [all] Error 2
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0'
:info:build make[2]: *** [metis] Error 2

3rdParty library failing... and the log does not say why. Just linker failed, and I can't see the message from the linker :) OSX version? clang version?

comment:2 by Adam Dershowitz, 9 years ago

OS is 10.11.3 (which I have been using for a while now)
$clang -v
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Let me know if there is other information that I can provide that might be useful.

comment:3 by Martin Sjölund, 9 years ago

Great. Apple manually changes the clang version number so I can't tell what version it is...

comment:4 by Adam Dershowitz, 9 years ago

If it helps at all it corresponds to xcode 7.3, which was a recent update.

comment:5 by Adam Dershowitz, 9 years ago

I tried something that might give you a bit more information.
I switched to the temporary working directory:

cd /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/

Then tried to build it. The make files had been generated by the OM build attempt, so I tried to just make it, to see what errors I get:

$ make
/opt/local/bin/cmake -H"/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0" -B"/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0" --check-build-system CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/CMakeFiles" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/CMakeFiles/progress.marks"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f libmetis/CMakeFiles/metis.dir/build.make libmetis/CMakeFiles/metis.dir/depend
cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0" && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/libmetis" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/libmetis" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/libmetis/CMakeFiles/metis.dir/DependInfo.cmake" --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f libmetis/CMakeFiles/metis.dir/build.make libmetis/CMakeFiles/metis.dir/build
make[2]: Nothing to be done for `libmetis/CMakeFiles/metis.dir/build'.
[ 76%] Built target metis
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f programs/CMakeFiles/gpmetis.dir/build.make programs/CMakeFiles/gpmetis.dir/depend
cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0" && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/programs" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/programs" "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/programs/CMakeFiles/gpmetis.dir/DependInfo.cmake" --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f programs/CMakeFiles/gpmetis.dir/build.make programs/CMakeFiles/gpmetis.dir/build
[ 76%] Linking C executable gpmetis
cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_1.10.0~dev-182-g4c2263c/OMCompiler/3rdParty/metis-5.1.0/programs" && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/gpmetis.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -pipe -Os -arch x86_64 -fno-stack-protector  -DLINUX -D_FILE_OFFSET_BITS=64 -DNDEBUG -DNDEBUG2 -DHAVE_EXECINFO_H -DHAVE_GETLINE -O3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.11 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  -Wl,-undefined -Wl,dynamic_lookup CMakeFiles/gpmetis.dir/gpmetis.c.o CMakeFiles/gpmetis.dir/cmdline_gpmetis.c.o CMakeFiles/gpmetis.dir/io.c.o CMakeFiles/gpmetis.dir/stat.c.o  -o gpmetis  -L/home/karypis/local/lib  ../libmetis/libmetis.a -lm -Wl,-rpath,/home/karypis/local/lib 
ld: warning: directory not found for option '-L/home/karypis/local/lib'
ld: in ../libmetis/libmetis.a(error.c.o), section __DATA/__thread_bss extends beyond end of file, for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [programs/gpmetis] Error 1
make[1]: *** [programs/CMakeFiles/gpmetis.dir/all] Error 2
make: *** [all] Error 2

It looks like it is trying to find the home directory of "karypis" is that a developer of metis?

comment:6 by Adam Dershowitz, 9 years ago

It looks like it might be a compiler bug that showed up with xcode 7.3:
https://github.com/Homebrew/homebrew-science/issues/3461
https://llvm.org/bugs/show_bug.cgi?id=27059

comment:7 by Martin Sjölund, 9 years ago

Yes, karypis is the main developer of metis. And he uses cmake as a build system, so it includes a lot of weird things. But I lean towards XCode being wrong.

comment:8 by Adam Dershowitz, 9 years ago

It turns out that macports has a port for metis. So, I installed that port (5.1.0_3) which installed fine. Then tried to upgrade OM again. This time it went much further but failed on another 3rd party library. Log file is attached.

by Adam Dershowitz, 9 years ago

Attachment: main.2.log added

build log after metis install

comment:9 by Martin Sjölund, 9 years ago

It just randomly went further. Still failed on metis.

comment:10 by Adam Dershowitz, 9 years ago

I was hoping that it would pick-up the macports version of metis, and since it went much further, I was hoping that it had. I guess that was just a coincidence.

comment:11 by Adam Dershowitz, 9 years ago

I downgraded Xcode back to 7.2.1 so it now indicates
clang -v
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.4.0

And now OM 1.10.0~dev-203-g4cf0a28_0 does build successfully.
So I'm not sure if this is a true compiler error (as claimed in a link above), a metis bug, an OM bug or what?
But, the downgrade does function as a work around.

comment:12 by Martin Sjölund, 9 years ago

Milestone: Future
Resolution: duplicate
Status: newclosed

Duplicate of #3818

Note: See TracTickets for help on using tickets.