Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mac57mac57

macrumors 6502a
Original poster
Aug 2, 2024
605
366
Myrtle Beach, SC
Hi, my efforts with MacPorts on my PowerMac G5 DP 2.3 GHz are not going well. As my earlier post indicated, it has taken close to 24 hours and after all that time, it has failed. It appears to be complaining about an unknown ld option ... -export_dynamic. I did a "tail" of the last 45 lines of the log file. Is anyone here expert enough to look at this and help with a fix or workaround?
 

Attachments

  • macports.fail.txt
    6 KB · Views: 62
Hi, my efforts with MacPorts on my PowerMac G5 DP 2.3 GHz are not going well. As my earlier post indicated, it has taken close to 24 hours and after all that time, it has failed. It appears to be complaining about an unknown ld option ... -export_dynamic. I did a "tail" of the last 45 lines of the log file. Is anyone here expert enough to look at this and help with a fix or workaround?

Paging @barracuda156
 
  • Like
Reactions: TheShortTimer
Hi, my efforts with MacPorts on my PowerMac G5 DP 2.3 GHz are not going well. As my earlier post indicated, it has taken close to 24 hours and after all that time, it has failed. It appears to be complaining about an unknown ld option ... -export_dynamic. I did a "tail" of the last 45 lines of the log file. Is anyone here expert enough to look at this and help with a fix or workaround?

You need this: https://github.com/macports/macports-ports/pull/25254

Specifically, do this:

Code:
sudo port uninstall py312-meson
sudo port -v patch py312-meson

After that go to /opt/local/var/macports/build, you will see a directory for py312-meson. Or just:
Code:
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-meson/py312-meson/work/meson-1.5.1

From there open a file `mesonbuild/linkers/linkers.py` in BBEdit / TextWrangler (or another code editor) and delete these two lines:
Code:
--- mesonbuild/linkers/linkers.py
+++ mesonbuild/linkers/linkers.py
@@ -839,9 +839,6 @@ class AppleDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker):
     def get_thinlto_cache_args(self, path: str) -> T.List[str]:
         return ["-Wl,-cache_path_lto," + path]
 
-    def export_dynamic_args(self, env: 'Environment') -> T.List[str]:
-        return self._apply_prefix('-export_dynamic')
-
 
 class LLVMLD64DynamicLinker(AppleDynamicLinker):

Once done, run install normally:
Code:
sudo port install py312-meson

I think only py312- one is relevant. If something uses earlier ones, the fix is identical.

P. S. If you are comfortable with MacPorts ecosystem, you can make an overlay repo, place py-meson port directory there, run port sync, then force rebuild py*-meson ports (rebuild with -n, otherwise it gonna start rebuilding everything: sudo port -v -n upgrade --force py312-meson). If this sounds complicated, just follow what I have written above.

Let me know if this works.
 
Last edited:
Thanks barracuda156 - I think we crossed in time. Your post above was not there when I typed in this one, then when I came back, it was! Is any of it applicable to the new issue I am reporting below? ... a seemingly similar issue, but later in the fastfetch build process.

[post typed in before I saw the above from barracud156]

OK... I finally brute-forced by way around the issue I reported above, by finding the build file and eliminating the option that was causing the problem, and the port went ahead quite a bit further. Now however it has failed again. I have another of the same sort of problem, but I cannot find any way around this one.

Honestly, doesn't anyone test these formulae before releasing them? I have now worked through at least 4 errors in the build scripts just for fastfetch (which does seem to have a HUGE number of dependencies). There should not be any errors in a released product. One or two... OK, but 4? And that doesn't even consider the ones I have had to force my way around on my MacStudio for the MacPorts running there! It took me most of the afternoon to get Midnight Commander running there!

Anyway, the current fastfetch build issue is a complaint about another linker option (-pie) which it doesn't know what to do with. Any and all insights would be REALLY appreciated! See the attached file for the last 30 lines of the error log.
 

Attachments

  • fastfetch.err.txt
    3.9 KB · Views: 61
OK... I finally brute-forced by way around the issue I reported above, by finding the build file and eliminating the option that was causing the problem, and the port went ahead quite a bit further. Now however it has failed again. I have another of the same sort of problem, but I cannot find any way around this one.

Looks like this: https://trac.macports.org/ticket/69815

Should be sufficient to open Portfile of libjxl and add this somewhere below (does not matter where exactly):
Code:
configure.ldflags-append -Wl,-read_only_relocs,suppress

Honestly, doesn't anyone test these formulae before releasing them?

There are around 40k ports in MacPorts. Every update of any port potentially can break something. GitHub only offers CI for macOS 12+. Very few ppl have PowerPC hardware. Everyone has limited free time.

P. S. If you refer specifically to me, I build everything and test only on 10.6 ppc, which I mentioned here and there. I have no idea what builds on 10.5, though in most cases what builds on 10.6 also builds on 10.5. But there is no guarantee.
If you want something to work for sure, use 10a190. I cannot guarantee anything else, though I can try to suggest some fixes.
 
@barracuda156, thank you so much, and I DEFINITELY was NOT referring to you in my comments on testing of formulae!

BTW, I also found issues with the glib2 build process (that was the one I "brute forced" around), so I will look into opening a defect report with MacPorts. Clearly this is community thing, so I will do my part.

Please pardon my ignorance, but is the portfile one or more of the .cmake files? What file is it that I should be adding the line to that you suggested to add?
 
Last edited:
@barracuda156, thank you so much, and I DEFINITELY was NOT referring to you in my comments on testing of formulae!

BTW, I also found issues with the glib2 build process (that was the one I "brute forced" around), so I will look into opening a defect report with MacPorts. Clearly this is community thing, so I will do my part.

Please pardon my ignorance, but is the portfile one or more of the .cmake files? What file is it that I should be adding the line to that you suggested to add?

Meson fix is merged to upstream, so just run `sudo port sync`. No need to do anything with it.

For portfiles, an easy thing will be to install TextWrangler (it was a free app) and then just use this:
Code:
edit `port file SOMEPORTNAME`

For BBEdit the equivalent command will be `bbedit` in place of `edit`. Perhaps other editors can do the same.

Portfiles are located in `/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/` (assuming a default prefix and default settings for sources).
 
@barracuda156 , thanks again! You are a fountain of knowledge! I will try this and see what happens.

All of this for FastFetch... but of course, once that is working, there is a universe of other ports that I can install and that is a big draw for me. This is because I used Linux as my "daily driver" from 2004 through 2006, at which time I bought the PowerMac G5 DP I am using right now for all this testing. So, while dated, I have a reasonable knowledge of the Linux of the day, and lots of favorite apps from the Linux world that I would love to port into my Sorbet environment. MacPorts is of real interest to me as a result.
 
@barracuda156 , thanks again! You are a fountain of knowledge! I will try this and see what happens.

All of this for FastFetch... but of course, once that is working, there is a universe of other ports that I can install and that is a big draw for me. This is because I used Linux as my "daily driver" from 2004 through 2006, at which time I bought the PowerMac G5 DP I am using right now for all this testing. So, while dated, I have a reasonable knowledge of the Linux of the day, and lots of favorite apps from the Linux world that I would love to port into my Sorbet environment. MacPorts is of real interest to me as a result.

Re Linux, LOL, I have been going through a lot of pain in past few days trying to make MacPorts work on Pinix (riscv64).
By now I was able to mostly get portindex work and installed 5–6 ports from source.

If you ever feel something is hard or annoying on ppc MacOS, just try installing MacPorts on Linux or OpenBSD ))
 
This has to be a stupid question (I must be missing something) but why would you want MacPorts on Linux or OpenBSD? Each distro typically comes with it's own package manager and a whole set of supported packages. Are you just trying to add packages that are missing from the distro itself?
 
Finally, success! ... the pointers from @barracuda156 were right on the mark. I had to install TextWrangler, and hunt for a long time to find the portfile for libjxl, but in the end all was well, and when I made the port file change suggested by @barracuda156 , the port went right through and the install of fastfetch *finally* succeeded.

[drum roll please]

... and the output of fastfetch appears below:
FastFetch Output, PowerMac G5 DP.jpg

MANY, MANY thanks @barracuda156 !
 
  • Like
Reactions: barracuda156
This has to be a stupid question (I must be missing something) but why would you want MacPorts on Linux or OpenBSD? Each distro typically comes with it's own package manager and a whole set of supported packages. Are you just trying to add packages that are missing from the distro itself?

With MacPorts I presumably need to spend a few days to tweak the build system, and then it just works. If it fails, I more or less know what to do.

If I use some alternative build system, I need to get accustomed to it to begin with, then when it fails, I need to learn how to deal with that, and whatever ports I have in MacPorts I need to rewrite into some other syntax. Even if that is purely mechanical, it gonna take a lot of time.
 
Finally, success! ... the pointers from @barracuda156 were right on the mark. I had to install TextWrangler, and hunt for a long time to find the portfile for libjxl, but in the end all was well, and when I made the port file change suggested by @barracuda156 , the port went right through and the install of fastfetch *finally* succeeded.

[drum roll please]

... and the output of fastfetch appears below:
View attachment 2406099
MANY, MANY thanks @barracuda156 !

I have updated it to 2.21.3. Hopefully nothing got broken LOL, I only tested on 10.6 ppc.
If something fails, ping me.
 
What is new in 2.2.1.3? Is it worth the fight to get it running?

I have more or less given up on MacPorts for Sorbet and Leopard as a whole at this point. I have tried 3 more ports (Smultron, nnn and AbiWord) and ALL of them failed during the build process. I eventually coaxed one more, sxiv, into building, but it crashes when run. If EVERY port is a major fight to get it to "go", it seems very unproductive.
 
What is new in 2.2.1.3? Is it worth the fight to get it running?

I have more or less given up on MacPorts for Sorbet and Leopard as a whole at this point. I have tried 3 more ports (Smultron, nnn and AbiWord) and ALL of them failed during the build process. I eventually coaxed one more, sxiv, into building, but it crashes when run. If EVERY port is a major fight to get it to "go", it seems very unproductive.

I do not think there is any fight involved, it should be a trivial upgrade.

Re other ports:

Smultron looks broken on every system and not updated forever: https://ports.macports.org/port/Smultron/details
Why do you expect it to work?

nnn should build, but I need a log to see what fails on 10.5. I believe, I have it installed on 10.6 ppc.

I hope you tried to install abiword-x11? That builds and works for me, though I never tried it on 10.5. If you attach a log, I will look into that.

sxiv works on 10.6 ppc. What fails for you on 10.5? Please attach a log.
 
Thanks @barracuda156 , I will do the build for nnn and abiword-x11 and get back to you. I will retry the build for sxiv, but I believe I got that one to build; it just doesn't run. I will retry it and clarify.

As for Smultron, it is the text editor I use on a day to day basis (have been using it since 2006 - I just like it) and I was trying to get to v3.6. vs. the v3.5 I have now. Smultron is VERY current and remains under active development as far as I can tell; I am running version 13.4.2 (2024) on my MacStudio!
 
Thanks @barracuda156 , I will do the build for nnn and abiword-x11 and get back to you. I will retry the build for sxiv, but I believe I got that one to build; it just doesn't run. I will retry it and clarify.

As for Smultron, it is the text editor I use on a day to day basis (have been using it since 2006 - I just like it) and I was trying to get to v3.6. vs. the v3.5 I have now. Smultron is VERY current and remains under active development as far as I can tell; I am running version 13.4.2 (2024) on my MacStudio!

Wait, nnn is indeed broken, I will attend to that. Do not waste time on it, it includes a header which does not exist LOL

abiword-x11 and sxiv work for me, since I updated them last time.

Let me look at Smultron.
 
Thanks @barracuda156 , I will do the build for nnn and abiword-x11 and get back to you. I will retry the build for sxiv, but I believe I got that one to build; it just doesn't run. I will retry it and clarify.

As for Smultron, it is the text editor I use on a day to day basis (have been using it since 2006 - I just like it) and I was trying to get to v3.6. vs. the v3.5 I have now. Smultron is VERY current and remains under active development as far as I can tell; I am running version 13.4.2 (2024) on my MacStudio!

In the meanwhile, maybe clifm will substitute for nnn, until we fix the latter?
 
Thanks @barracuda156 , I will do the build for nnn and abiword-x11 and get back to you. I will retry the build for sxiv, but I believe I got that one to build; it just doesn't run. I will retry it and clarify.

As for Smultron, it is the text editor I use on a day to day basis (have been using it since 2006 - I just like it) and I was trying to get to v3.6. vs. the v3.5 I have now. Smultron is VERY current and remains under active development as far as I can tell; I am running version 13.4.2 (2024) on my MacStudio!

Anyway, I fixed nnn, will make PR in a few minutes.

UPD. This should build: https://github.com/macports/macports-ports/pull/25379
 
Last edited:
Thanks @barracuda156 , I will do the build for nnn and abiword-x11 and get back to you. I will retry the build for sxiv, but I believe I got that one to build; it just doesn't run. I will retry it and clarify.

As for Smultron, it is the text editor I use on a day to day basis (have been using it since 2006 - I just like it) and I was trying to get to v3.6. vs. the v3.5 I have now. Smultron is VERY current and remains under active development as far as I can tell; I am running version 13.4.2 (2024) on my MacStudio!

Smultron has built with zero changes, so now I have all ports which you were asking about.

nnn.png
 
Thanks @barracuda156, I will retry nnn and Smultron and post back.

Meantime, a new day and inexplicably, new results. I tried building Abiword-x11 and rebuilding nnn, and captured logs as requested. Both failed, as expected. Then, on a whim, I started X and tried running my existing sxiv port. It worked! What crashed yesterday ran flawlessly today. Ditto for gnumeric, which popped up a big, beautiful content-full window. Again, what crashed yesterday succeeded today.

I am at a loss to explain. I did do a few additional build attempts, and those built and deployed a few new dependencies, and I did restart my machine at one point. Now sxiv and gnumeric run successfully, despite no attempt to rebuild them... the exact same ports that failed yesterday work today. Did I happen to build a dependency that was not included by the portfile for one or each? I just don't know!

I checked to see which version of X11 I ran, and it was the one in /opt/local/bin, which looks to me like xorg-server-legacy. I issued the command "startx" to get it running, but I have yet to check what startx is configured to do besides the basic of starting X-Windows... Ran out of time for the day yesterday. I will check today.

Anyway, I am delighted to have gnumeric running... and also sxiv. Now I am going to try Geeqie, am interesting looking image viewer.
 
Oh... and attached are the logs for the build failures of Abiword-x11 and nnn.
 

Attachments

  • nnn-buildlog.txt
    8.2 KB · Views: 55
  • abiword-x11-buildlog.txt
    4.3 KB · Views: 42
Oh... and attached are the logs for the build failures of Abiword-x11 and nnn.

You should have used my fix for nnn. Of course it fails without it: the code is broken.

Please run sudo port sync, I hope nnn portfile gets the update (PR was merged 6 hrs ago). It should build normally then.
 
Oh... and attached are the logs for the build failures of Abiword-x11 and nnn.

For libical: I know the problem and why it never shown up for me (will fix it today), but you can hopefully install it now like this:

Code:
sudo port clean libical 
sudo port -v install libical configure.compiler=macports-gcc-7

Still better if you just add this line in its portfile (then install normally):
Code:
compiler.cxx_standard 2011
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.