Opened 5 years ago
Closed 5 years ago
#60408 closed defect (worksforme)
Unable to Build clang-3.7 on Lion -- Build crashes and hangs
Reported by: | RobK88 | Owned by: | kencu (Ken) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.2 |
Keywords: | Cc: | jeremyhu (Jeremy Huddleston Sequoia), larryv (Lawrence Velázquez) | |
Port: | clang-3.7 |
Description
I am unable to upgrade clang-3.7 on my Mac running Lion. Macports is using libc++
The command "sudo port upgrade clang-3.7" just crashes and hangs.
I need to look at the console to see the crashes for the various threads! Please see the attached crash reports from my console.
Any ideas on a solution would be greatly appreciated.
Attachments (11)
Change History (23)
Changed 5 years ago by RobK88
Attachment: | clang_2020-04-28-114755_localhost.crash added |
---|
Changed 5 years ago by RobK88
Attachment: | clang_2020-04-28-114756_localhost.crash added |
---|
Changed 5 years ago by RobK88
Attachment: | clang_2020-04-28-114756-1_localhost.crash added |
---|
Changed 5 years ago by RobK88
Attachment: | clang_2020-04-28-114759_localhost.crash added |
---|
Changed 5 years ago by RobK88
Attachment: | clang_2020-04-28-114800_localhost.crash added |
---|
Changed 5 years ago by RobK88
Attachment: | clang_2020-04-28-114806_localhost.crash added |
---|
Changed 5 years ago by RobK88
Attachment: | clang_2020-04-28-114806-1_localhost.crash added |
---|
Changed 5 years ago by RobK88
Attachment: | clang_2020-04-28-114807_localhost.crash added |
---|
Changed 5 years ago by RobK88
Attachment: | clang_2020-04-28-114808_localhost.crash added |
---|
comment:1 Changed 5 years ago by RobK88
comment:2 Changed 5 years ago by kencu (Ken)
Oh, I'm sorry to hear that. Let's see if we can get you sorted out.
Would you be able to upload your main.log please so I can get an idea what is going on?
comment:3 Changed 5 years ago by kencu (Ken)
Cc: | kencu@… removed |
---|---|
Owner: | set to kencu |
Status: | new → assigned |
Changed 5 years ago by RobK88
comment:5 Changed 5 years ago by kencu (Ken)
Somewhat strange. Things go smoothly until the build starts to build compiler-rt
with the newly-minted clang, and then that crashes, as per your crashlogs.
:info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/tools/clang/runtime/compiler-rt' :info:build /usr/bin/make -C /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/llvm-3.7.1.src/projects/compiler-rt \ :info:build ProjSrcRoot=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/llvm-3.7.1.src/projects/compiler-rt \ :info:build ProjObjRoot=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/tools/clang/runtime/compiler-rt \ :info:build CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/bin/clang" \ :info:build VERBOSE=1 \ :info:build clang_darwin clang_macho_embedded :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/llvm-3.7.1.src/autoconf/mkinstalldirs /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/lib/clang/3.7.1/lib/darwin > /dev/null :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/llvm-3.7.1.src/autoconf/mkinstalldirs /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/lib/clang/3.7.1/lib/macho_embedded > /dev/null :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/llvm-3.7.1.src/autoconf/mkinstalldirs /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/lib/clang/3.7.1/include/sanitizer :info:build cp /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/llvm-3.7.1.src/projects/compiler-rt/include/sanitizer/*.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/lib/clang/3.7.1/include/sanitizer :info:build mkdir: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/lib/clang/3.7.1/lib: File exists :info:build /bin/date > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/lib/clang/3.7.1/lib/darwin/.dir :info:build /bin/date > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/lib/clang/3.7.1/lib/macho_embedded/.dir :info:build warning: clang_darwin.mk: dropping arch 'i386' from lib 'eprintf' (clang does not support it) :info:build warning: clang_darwin.mk: dropping arch 'ppc' from lib '10.4' (clang does not support it) :info:build warning: clang_darwin.mk: dropping arch 'i386' from lib '10.4' (clang does not support it) :info:build warning: clang_darwin.mk: dropping arch 'x86_64' from lib '10.4' (clang does not support it) :info:build make[3]: *** [BuildRuntimeLibraries] Interrupt: 2 :info:build make[3]: *** Deleting intermediate file `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/lib/clang/3.7.1/lib/macho_embedded/.dir' :info:build make[3]: *** Deleting intermediate file `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/build/Release+Debug/lib/clang/3.7.1/lib/darwin/.dir' :info:build make[2]: *** [compiler-rt/.makeall] Interrupt: 2 :info:build make[1]: *** [all] Interrupt: 2 :info:build make: *** [all] Interrupt: 2
I have seen that before, when llvm was built with a too-old clang version, but on your system, llvm-3.7 should have been built with clang-3.4, and that does built it correctly.
The buildbot last built clang-3.7 correctly on 10.7 in January <https://build.macports.org/builders/ports-10.7_x86_64-builder/builds/15670> but there have been a few (minor, I thought) changes to clang-3.7 since then.
I'll try on my 10.7 system again to see.
Do you have a version of clang-3.7 installed at this time, that you are trying to update? Does it work? Or crash?
comment:6 Changed 5 years ago by RobK88
Clang-3.7 was on my system before. Macports is just trying to upgrade it.
Below is the output of some commands.
I do not know how to test clang-3.7. Pleasw let me know.
port installed clang-3.7 The following ports are currently installed: clang-3.7 @3.7.1_5+analyzer (active) rob$ clang --version Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix
comment:7 Changed 5 years ago by RobK88
Here is some more output. Looks like clang-3.7 is working. I just cannot upgrade it.
rob$ /opt/local/bin/clang-mp-3.7 --version clang version 3.7.1 (tags/RELEASE_371/final) Target: x86_64-apple-darwin11.4.2 Thread model: posix Grinchs-Mac-Pro:~ rob$ /opt/local/bin/clang++-mp-3.7 --version clang version 3.7.1 (tags/RELEASE_371/final) Target: x86_64-apple-darwin11.4.2 Thread model: posix Grinchs-Mac-Pro:~ rob$
comment:8 Changed 5 years ago by kencu (Ken)
I just rebuilt clang-3.7 from source on my 10.7 VM and it finished without any troubles.
I'm not sure I can explain why yours is crashing, but what I would do if I wanted to fix it would be to do this:
sudo port -f uninstall llvm-3.7 sudo port -f uninstall clang-3.7 sudo port clean llvm-3.7 sudo port clean clang-3.7
then
sudo port -v install clang-3.7
and when it asks you if you want to install llvm-3.7, agree. You should download and install prebuilt binaries off the buildbot, and that will be the end of that.
Don't try to configure any fancy variants in llvm-3.7 or clang-3.7 -- just leave the defaults as they are -- and you will get (should get) the prebuilts.
We are just about to launch a mega-upgrade of every llvm / clang / lldb version in MacPorts (OMG) and every single compiler is about to get revbumped, with minor tweaks in building, but one of the core supporting libraries, libffi, is being revbumped and (at present) nobody knows how that will go. Hopefully smoothly :>
comment:9 Changed 5 years ago by RobK88
Thanks Ken.
I did exactly what you suggested and voila! -- It worked. Perhaps llvm-3.7 was corrupted somehow.
But macports did NOT download any prebuilt binaries. They were compiled from source.
Attached is my macport.conf file. Looks like "buildfromsource" is set to "always". Perhaps that is the reason. :-) What should this setting normally be set to?
If you see any other odd setting in my macports.conf, please let me know. Thanks.
Changed 5 years ago by RobK88
Attachment: | macports.conf added |
---|
comment:10 Changed 5 years ago by kencu (Ken)
Yes, that is why you're not getting the binaries. Please see: LibcxxOnOlderSystems#LionandMountainLion for what you should do, but basically you just want a fully default macports.conf now, assuming you're using the usual default prefix of /opt/local.
You may have an issue with the "delete_la_files" section I'm afraid, as that changed in an important, software-breaking way as of MacPorts 2.6. I am not an expert on that issue, but it seems to be something Josh and Ryan were quite worried about.
Your macports.conf is from 2014. Some things have changed over the years. You might consider a "spring cleaning". The instructions here Migration show you a way to put out a text file with a list of all your currently-installed software.
You would then either sudo port -f uninistall installed
and then reinstall them all with the instructions in Migration, or, for a "deep clean", just totally uninstall MacPorts (after you have your ports list saved) -- there is yet another WIKI page that tells you how to totally uninstall MacPorts), and install a new version of MacPorts fresh, and then reinstall all your ports from that text file.
comment:11 Changed 5 years ago by RobK88
Many thanks Ken. And yes my macports.conf file is old. Looks like if I want to be able to download any pre-build binaries, I will need to reinstall macports since my current setting for delete_la_files is yes. (I believe new macports installs use NO now for delete-la-files). In other words, any downloaded prebuilt binaries would not be compatible with any of my other current binaries built form source because the setting "delete_la_files" is "yes".
To reinstall, I will need to save a list of all my currently installed ports, uninstall all of ports, uninstall macports itself and then do a complete reinstall of macports and all the ports.
But I may just leave things alone for now and continue to build from source with my current settings. Should work just fine. But if things really start to break, I will have to do as you suggest.
comment:12 Changed 5 years ago by kencu (Ken)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
P.S. I did trying the following with no success: