<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">If the question is whether it is possible to compile for 10.6 x86_64, then certainly yes.<br />
<br />
However, you seem to be doing rather non-trivial thing: compiling on 10.6 with libc++ from 10.7 and intention to have binaries working on 10.6+.<br />
<br />
If you do not have to build texlive often and have some space on a drive, won’t it be easier to just use a native C++ runtime, libstdc++, for 10.6? Of course, that means that you will need two set-ups, for 10.6 builds and 10.7+.<br />
<br />
On the other hand, you may try using a set-up which I used on powerpc to build against libc++. Since it works on 10.6 ppc, there are no reasons for it not to work on 10.7+ on Intel. However, that gonna require a custom set-up, obviously.<br />
<br />
(Sorry, this may not be an answer you wanted.)</div>
</div>
<div name="messageSignatureSection"><br />
Serge</div>
<div name="messageReplySection">On Apr 5, 2025 at 06:33 +0800, grey <artkiver@gmail.com>, wrote:<br />
<blockquote type="cite" style="border-left-color: grey; border-left-width: thin; border-left-style: solid; margin: 5px 5px;padding-left: 10px;">I'm not too sure since you didn't specify how legacy for older OS X<br />
systems you are intending?<br />
<br />
Since MacPorts deprecated Tiger and we lost kencu earlier this year;<br />
maybe this blog post from Dr. Brian Robert Callahan will be helpful?<br />
<br />
https://briancallahan.net/blog/20250329.html<br />
<br />
Admittedly, it looks as if he is making use of Tigerbrew<br />
(https://github.com/mistydemeo/tigerbrew) and using GCC not LLVM/Clang<br />
but it's relatively recent and about the best reference I can think of<br />
off the top of my head as far as individuals toiling in similar<br />
realms. I realize it's not really helpful with your specific questions<br />
about static compilation.<br />
<br />
Doubtlessly others might have better suggestions.<br />
<br />
<br />
On Fri, Apr 4, 2025 at 9:51 PM Mojca Miklavec <mojca@macports.org> wrote:<br />
<blockquote type="cite"><br />
Hi,<br />
<br />
I've been using the latest clang++-mp-xx compiler (whatever the latest<br />
happened to be in a particular year) on 10.6 for ages, in order to<br />
compile TeX Live for non-macports users.<br />
<br />
If I remember correctly, I usually took libc++ from 10.7 SDK in order<br />
to ensure that the resulting binaries would work out of the box for<br />
any >= Lion user, and on 10.6 for anyone who happened to have libc++<br />
installed. Sometimes libc++ got overwritten by MacPorts without me<br />
noticing, and then some Lions users would complain, I would install an<br />
old version of libc++ again, and things started working for everyone<br />
again.<br />
<br />
This year I switched to clang 17 and a user of macOS 10.13 started<br />
complaining about<br />
<br />
dyld: Symbol not found: ___emutls_get_address<br />
Referenced from: /LocalApps/texlive/bin/x86_64-darwinlegacy/luajithbtex<br />
Expected in: /usr/lib/libc++.1.dylib<br />
<br />
https://tug.org/pipermail/tlbuild/2025q2/005706.html<br />
<br />
An older binary that was compiled last year with an older clang works<br />
for that user.<br />
<br />
I did try to copy Lion's libc++ to /usr/lib again, but this time the<br />
compilation no longer works:<br />
<br />
<blockquote type="cite">/opt/local/bin/clang++-mp-17 a.cpp -o ./a<br /></blockquote>
dyld: Library not loaded: /usr/lib/libc++.1.dylib<br />
Referenced from: /opt/local/libexec/llvm-17/bin/clang++<br />
Reason: no suitable image found. Did find:<br />
/usr/lib/libc++.1.dylib: can't map<br />
/usr/lib/libc++.1.dylib: can't map<br />
<br />
Most likely because libc++ was meant to be modernised in order to be<br />
able to support newer C++ standards.<br />
<br />
https://trac.macports.org/ticket/62426<br />
<br />
Ken was hinting that static compilation might be feasible, but I'm<br />
unable to figure out how exactly.<br />
<br />
Does anyone know if compiling on 10.6 for other legacy macOS versions<br />
is still feasible, and if so, what should I modify?<br />
<br />
Thank you very much,<br />
Mojca<br /></blockquote>
</blockquote>
</div>
</body>
</html>