Opened 4 years ago

Closed 4 years ago

#59807 closed defect (duplicate)

libcxx needs a method to bootstrap to the +emulated_tls variant

Reported by: fvaccari Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: snowleopard Cc: kencu (Ken)
Port: libcxx

Description

I've started a brand new installation of MacPorts on a 10.6.8 box, and gdal fails to build.

In my case it was a dependency for gmt4. I then uninstalled all packages and tried to install gdal as first package. After all gdal dependencies installed properly, the error was still there.

:info:build ld: warning: could not create compact unwind for ___tls_init: non-standard register 1 being saved in prolog
:info:build ld: warning: could not create compact unwind for __ZTWL17g_tls_projContext: non-standard register 1 being saved in prolog
:info:build ld: warning: could not create compact unwind for ___tls_init: non-standard register 1 being saved in prolog
:info:build Undefined symbols for architecture x86_64:
:info:build   "___cxa_thread_atexit", referenced from:
:info:build       _GDALOpenEx in libgdal.la-2.o
:info:build       ___cxx_global_var_init in libgdal.la-2.o
:info:build       ___cxx_global_var_init.2 in libgdal.la-2.o
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[1]: *** [libgdal.la] Error 1

Full log attached

Attachments (1)

main.log (6.6 MB) - added by fvaccari 4 years ago.

Change History (9)

Changed 4 years ago by fvaccari

Attachment: main.log added

comment:1 Changed 4 years ago by mf2k (Frank Schima)

Cc: vince@… removed
Keywords: snowleopard added; snow leopard removed
Owner: set to Veence
Status: newassigned

comment:2 Changed 4 years ago by kencu (Ken)

For this, you unfortunately need to do a manual step to install libcxx with the +emulated_tls variant. We have not as yet automated this process yet.

Once you have a modern clang version installed through bootstrapping, at least clang-5.0 or better, if you do this, you should be good to go:

sudo port -v -n upgrade --enforce-variants libcxx +emulated_tls +universal
Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:3 Changed 4 years ago by kencu (Ken)

Owner: changed from Veence to jeremyhu
Port: libcxx added; gdal removed
Summary: gdal fails to compile on Snow Leopardlibcxx needs a method to bootstrap to the +emulated_tls variant

comment:4 Changed 4 years ago by kencu (Ken)

Cc: kencu added

comment:5 Changed 4 years ago by kencu (Ken)

and this is a duplicate of another ticket that also has outlined this issue, although you couldn't possibly know that as the person who ran across the issue trying to install gdal....

comment:6 Changed 4 years ago by kencu (Ken)

currently libcxx has the default variant of +emulated_tls if the toolchain parts are in place to build it.

But I wonder if we might be able to make the +emulated_tls variant a default variant the port is being installed from the buildbot. Then we could skip the bootstrapping issues that way.

The apple_gcc42 port has a standard install of no variants, but to get to that standard install, you first need to install the bootstrap variant, and then do the manual step of reinstalling it without the bootstrap variant. But this means that users who get the port from the buildbot get the fully functional version from the buildbot, skipping the bootstrap variant entirely.

Perhaps some variation on that logic might work here too... and maybe the same for the ld64-latest variant of ld64 as well, which currently has the same manual bootstrapping step.

Version 0, edited 4 years ago by kencu (Ken) (next)

comment:7 Changed 4 years ago by fvaccari

I can confirm that after doing

sudo port -v -n upgrade --enforce-variants libcxx +emulated_tls +universal

gdal installed successfully. Thanks for pointing me at that solution

comment:8 Changed 4 years ago by kencu (Ken)

Resolution: duplicate
Status: assignedclosed
Note: See TracTickets for help on using tickets.