Opened 2 months ago

Last modified 2 weeks ago

#70733 new defect

gdb upgrade fails to build after selfupdate

Reported by: TheLastLovemark Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: Cc: Randrianasulu (Andrew Randrianasulu)
Port: gdb

Description

port upgrade gdb fails to build on macOS 10.13.6 after performing port -fv selfupdate

The active installed version is gdb @13.2_0+multiarch+python311

The log file is attached.

Attachments (2)

gdb_upgrade-main.log (243.8 KB) - added by TheLastLovemark 2 months ago.
gdb_upgrade-after_CLT_reinstall-main.log (245.2 KB) - added by TheLastLovemark 2 months ago.

Download all attachments as: .zip

Change History (13)

Changed 2 months ago by TheLastLovemark

Attachment: gdb_upgrade-main.log added

comment:1 Changed 2 months ago by jmroot (Joshua Root)

:info:build fatal error: error in backend: Cannot select: intrinsic %llvm.x86.sha1rnds4
:info:build yes
:info:build checking for library containing setsockopt... clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
:info:build Apple LLVM version 10.0.0 (clang-1000.10.44.4)
:info:build Target: x86_64-apple-darwin17.7.0
:info:build Thread model: posix
:info:build InstalledDir: /Library/Developer/CommandLineTools/usr/bin
:info:build clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
:info:build clang: note: diagnostic msg: 
:info:build ********************
:info:build PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
:info:build Preprocessed source(s) and associated run script(s) are located at:
:info:build clang: note: diagnostic msg: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gdb/gdb/work/.tmp/sha1-e6dd9c.c
:info:build clang: note: diagnostic msg: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gdb/gdb/work/.tmp/sha1-e6dd9c.sh
:info:build clang: note: diagnostic msg: Crash backtrace is located in
:info:build clang: note: diagnostic msg: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gdb/gdb/work/.home/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
:info:build clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
:info:build clang: note: diagnostic msg: 
:info:build ********************

Xcode 9.4.1 installs clang-902.0.39.2 and Xcode 10.0 has clang-1000.11.45.2. You seem to have something in between with clang-1000.10.44.4, despite the detected versions being Xcode 10.1, CLT 10.1.0.0.1.1539992718 as per the log.

comment:2 Changed 2 months ago by TheLastLovemark

Not 100% sure how that happened, but I have a hunch.

Do you know what specifically uses that version of clang ?

I do remember installing an additional CLT SDK, per the solution to an old ticket from years ago. Could that be the culprit behind the mystery clang version??

Please see #59938

I looked in /Library/Developer/CommandLineTools/SDKs

there are 3 SDKs in there:

  1. MacOSX.sdk
  2. MacOSX10.13.sdk 1
  3. MacOSX10.14.sdk <--- symlinked to 1.
Last edited 2 months ago by TheLastLovemark (previous) (diff)

comment:3 in reply to:  2 Changed 2 months ago by jmroot (Joshua Root)

Replying to TheLastLovemark:

Do you know what specifically uses that version of clang ?

Probably everything that doesn't set use_xcode yes, since it says it's installed in /Library/Developer/CommandLineTools/usr/bin and that will be what gets run by /usr/bin/clang when DEVELOPER_DIR='/Library/Developer/CommandLineTools'. You might try reinstalling the CLTs?

comment:4 Changed 2 months ago by TheLastLovemark

pkgutil --pkg-info=com.apple.pkg.{CLTools_Executables,CLTools_Base,DeveloperToolsCLI,DeveloperToolsCLILeo} 2>/dev/null | sed -n 's/^version: //p'

reveals

10.1.0.0.1.1539992718 before the reinstall.

I have reinstalled the CLTs as instructed.

10.1.0.0.1.1539992718 after the reinstall.

Should I retry to install gdb now?

Last edited 2 months ago by TheLastLovemark (previous) (diff)

Changed 2 months ago by TheLastLovemark

comment:5 Changed 2 months ago by TheLastLovemark

Failed again.

Log file is attached as gdb_upgrade-after_CLT_reinstall-main.log.

comment:6 Changed 2 months ago by jmroot (Joshua Root)

It seems that that is just the clang version that the CLTs for Xcode 10.1 install, which doesn't match the version in Xcode itself for some reason.

comment:7 Changed 2 months ago by TheLastLovemark

Should I try a different debugger like valgrind?

comment:8 Changed 2 months ago by TheLastLovemark

Is there anything else I can do?

comment:9 Changed 2 weeks ago by Randrianasulu (Andrew Randrianasulu)

Also fails in 10.12.6

configure: error: *** A compiler with support for C++17 language features is required.

comment:10 Changed 2 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: Randrianasulu added

There's no sign of that message in the original log. Different problems need to be filed in different tickets.

comment:11 Changed 2 weeks ago by Randrianasulu (Andrew Randrianasulu)

Ah, I just thought that both errors can be avoided by compiling gdb with one of new enough clangs installed by macports ....

Note: See TracTickets for help on using tickets.