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

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
I tried to install xapian-core with GCC13 on 10.5.8 Powerbook G4, failed with:

Code:
libtool: compile:  /opt/local/bin/g++-mp-13 -DHAVE_CONFIG_H -I. -I./common -I./include -I/opt/local/include -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wformat-security -fno-gnu-keywords -Wundef -Woverloaded-virtual -Wstrict-null-sentinel -Wshadow -Wstrict-overflow=1 -Wlogical-op -Wmissing-declarations -Wdouble-promotion -Winit-self -Wduplicated-cond -Wduplicated-branches -fvisibility=hidden -fvisibility-inlines-hidden -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -fno-math-errno -MT net/tcpclient.lo -MD -MP -MF net/.deps/tcpclient.Tpo -c net/tcpclient.cc  -fno-common -DPIC -o net/.libs/tcpclient.o
In file included from net/tcpclient.cc:29:
net/resolver.h: In constructor 'Resolver::Resolver(const std::string&, int, int)':
net/resolver.h:99:18: error: 'AI_NUMERICSERV' was not declared in this scope; did you mean 'NI_NUMERICSERV'?
   99 |         flags |= AI_NUMERICSERV;
      |                  ^~~~~~~~~~~~~~
      |                  NI_NUMERICSERV
make[2]: *** [net/tcpclient.lo] Error 1

EDIT: You specifically asked for a log and not just an error message didn't you? I promise I can read...sometimes =). Attached log.

Thank you, we have a fix for that, I will update the port soon.
 

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
I tried to install xapian-core with GCC13 on 10.5.8 Powerbook G4, failed with:

Code:
libtool: compile:  /opt/local/bin/g++-mp-13 -DHAVE_CONFIG_H -I. -I./common -I./include -I/opt/local/include -Wall -W -Wredundant-decls -Wpointer-arith -Wcast-qual -Wcast-align -Wformat-security -fno-gnu-keywords -Wundef -Woverloaded-virtual -Wstrict-null-sentinel -Wshadow -Wstrict-overflow=1 -Wlogical-op -Wmissing-declarations -Wdouble-promotion -Winit-self -Wduplicated-cond -Wduplicated-branches -fvisibility=hidden -fvisibility-inlines-hidden -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -fno-math-errno -MT net/tcpclient.lo -MD -MP -MF net/.deps/tcpclient.Tpo -c net/tcpclient.cc  -fno-common -DPIC -o net/.libs/tcpclient.o
In file included from net/tcpclient.cc:29:
net/resolver.h: In constructor 'Resolver::Resolver(const std::string&, int, int)':
net/resolver.h:99:18: error: 'AI_NUMERICSERV' was not declared in this scope; did you mean 'NI_NUMERICSERV'?
   99 |         flags |= AI_NUMERICSERV;
      |                  ^~~~~~~~~~~~~~
      |                  NI_NUMERICSERV
make[2]: *** [net/tcpclient.lo] Error 1

EDIT: You specifically asked for a log and not just an error message didn't you? I promise I can read...sometimes =). Attached log.

Could you try this? https://github.com/xapian/xapian/pull/332/files
(Alternatively, just delete that one line or comment it out. It is not a required thing, and it should in fact be used conditionally.)
 

doctor_dog

macrumors regular
Dec 19, 2022
109
107
Your patch worked, I was able to build and install both xapian ports fine.

I don't see "nmail" in the port tree though, is it new or are you maybe referring to Ruby actionmailer? I last did a port update about a month ago.

EDIT: Nevermind, I found your nmail port on the MP github. I'll manually add it to local Port repo later and test.
 
Last edited:

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
Your patch worked, I was able to build and install both xapian ports fine.

I don't see "nmail" in the port tree though, is it new or are you maybe referring to Ruby actionmailer? I last did a port update about a month ago.

EDIT: Nevermind, I found your nmail port on the MP github. I'll manually add it to local Port repo later and test.

Thank you very much!

`nmail` should be in the port tree, I believe. Maybe you need to run `sudo port sync` to get it.
Code:
svacchanda@43-52 ~ % port deps nmail

Full Name: nmail @4.35_0

Build Dependencies:   cmake, pkgconfig

Library Dependencies: cyrus-sasl2, libetpan, libmagic, ncurses, ossp-uuid, sqlite3,

                      xapian-core, openssl3
 

doctor_dog

macrumors regular
Dec 19, 2022
109
107
I updated the port tree and made all the changes to get back to default GCC13.


I am getting an error when building nmail, snipped below, log attached. Looks like it'd be simple to fix, but wanted to report it for visibility

Unrelated, but side note: libffi is failing for me after updating the port tree, something about reversed patch detected.

nmail:

Code:
[  1%] Copy headers
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_nmail/nmail/work/nmail-4.35/ext/libetpan && mkdir -p /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_nmail/nmail/work/build/ext/libetpan/include/libetpan
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_nmail/nmail/work/nmail-4.35/ext/libetpan && cp -a src/low-level/imap/*.h /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_nmail/nmail/work/build/ext/libetpan/include/libetpan/
cp: illegal option -- a
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file ... target_directory
make[2]: *** [ext/libetpan/CMakeFiles/libetpan_headers] Error 64
 

Attachments

  • nmail.log.txt
    404.9 KB · Views: 41
  • Like
Reactions: barracuda156

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
Unrelated, but side note: libffi is failing for me after updating the port tree, something about reversed patch detected.

Could you please attach the log or at least quote the exact error?

Just in case, run this:
Code:
sudo port sync
sudo port clean libffi
sudo port -v update libffi

To make sure it actually fails.

libffi was updated in https://github.com/macports/macports-ports/pull/22860
I cannot confirm if it builds (no access to hardware), but there is only one patch now, and it seems to apply fine:
Code:
svacchanda@43-52 ~ % sudo port -v patch libffi

Password:

--->  Fetching distfiles for libffi

--->  libffi-3.4.6.tar.gz does not exist in /opt/local/var/macports/distfiles/libffi

--->  Attempting to fetch libffi-3.4.6.tar.gz from https://distfiles.macports.org/libffi

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 1359k  100 1359k    0     0  2034k      0 --:--:-- --:--:-- --:--:-- 2034k

--->  Verifying checksums for libffi

--->  Checksumming libffi-3.4.6.tar.gz

--->  Extracting libffi

--->  Extracting libffi-3.4.6.tar.gz

Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libffi/libffi/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/libffi/libffi-3.4.6.tar.gz' | /usr/bin/tar -xf -

--->  Applying patches to libffi

--->  Applying patch-pre-snowleopard.diff

Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.4.6" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/devel/libffi/files/patch-pre-snowleopard.diff'

patching file 'src/powerpc/darwin.S'

patching file 'src/powerpc/darwin_closure.S'

patching file 'testsuite/lib/libffi.exp'

patching file 'testsuite/libffi.bhaible/bhaible.exp'

P. S. Make sure you do not use a custom overlay version of the port (if you do use custom ports).
(If you do need a custom port for libffi, then make sure it is rebased correctly or apply the update manually.)
 
  • Like
Reactions: doctor_dog

doctor_dog

macrumors regular
Dec 19, 2022
109
107
Could you please attach the log or at least quote the exact error?
EDIT: It errors our during patching, so it probably does need that PR you linked.

I manually updated the files and it worked fine, the linked PR fixed libffi.

That said, I don't love doing 'port sync' (Macports mentions not to use it on macOS in their official docs in favor of self update, though does not indicate the reason why not). I say this because then I have to go re-fix GCC Portfiles and TCL files for compiler logic. Is there a way to sync just one port in the tree without taking the whole new port tree? Else I will test it manually later this week.

Either way, this is the erorr I get, I suspect it is fixed now:


Code:
sudo port -v patch libffi
--->  Fetching distfiles for libffi
--->  Verifying checksums for libffi
--->  Checksumming libffi-3.4.6.tar.gz
--->  Extracting libffi
--->  Extracting libffi-3.4.6.tar.gz
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libffi/libffi/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/libffi/libffi-3.4.6.tar.gz' | /usr/bin/gnutar --no-same-owner -xf -
--->  Applying patches to libffi
--->  Applying powerpc-g3.patch
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.4.6" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/devel/libffi/files/powerpc-g3.patch'
patching file src/powerpc/darwin.S
patching file src/powerpc/darwin_closure.S
--->  Applying patch-libffi-intel-leopard-sysv.diff
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.4.6" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/devel/libffi/files/patch-libffi-intel-leopard-sysv.diff'
patching file ./src/x86/sysv.S
Hunk #1 FAILED at 792.
Hunk #2 FAILED at 820.
Hunk #3 succeeded at 1262 with fuzz 2 (offset 142 lines).
2 out of 3 hunks FAILED -- saving rejects to file ./src/x86/sysv.S.rej
 
Last edited:

doctor_dog

macrumors regular
Dec 19, 2022
109
107
I am getting an error when building nmail, snipped below, log attached. Looks like it'd be simple to fix, but wanted to report it for visibility
`nmail` should be in the port tree, I believe. Maybe you need to run `sudo port sync` to get it.
I symlinked gnu coreutil's cp into /bin as a workaround for the initial error.

nmail seems to build find, but throws an error that it can't find CFNetwork framework at the end. See attached log.
 

Attachments

  • nmail.log.txt
    1.7 MB · Views: 44
  • Like
Reactions: barracuda156

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
I symlinked gnu coreutil's cp into /bin as a workaround for the initial error.

nmail seems to build find, but throws an error that it can't find CFNetwork framework at the end. See attached log.

Thank you. The latter is expected, yes. Hopefully we have a fix soon.

P. S. We can use coreutils for the build, that is not an issue.

UPD. Could you try building from here? https://github.com/macports/macports-ports/pull/22917
You should not need symlinking anymore.
 
Last edited:

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
I symlinked gnu coreutil's cp into /bin as a workaround for the initial error.

nmail seems to build find, but throws an error that it can't find CFNetwork framework at the end. See attached log.

UPD2. PR has been merged, you could run sudo port sync and then installation of nmail should work. No manual hacks should be needed.
 

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
Macports mentions not to use it on macOS in their official docs in favor of self update, though does not indicate the reason why not). I say this because then I have to go re-fix GCC Portfiles and TCL files for compiler logic. Is there a way to sync just one port in the tree without taking the whole new port tree?

1. I do not think it is the case, and as a matter of fact port sync works perfectly fine from Tiger to Sonoma. I never use self update and do not advise using it.

2. For gcc (or any other custom ports) a convenient way would be to have an overlay repo: https://guide.macports.org/chunked/development.local-repositories.html
Any port in a local repo will override the same port in Macports master, so syncing will not affect it.

The same works for portgroups (and perhaps compiler choice tcl files), but with a caveat: custom portgroups gonna apply to ports in an overlay repo only.
Therefore, what you can do is overwrite files after port sync. It will be faster and more robust than editing manually.

I.e., for example:
Code:
sudo port sync
sudo rm /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/compilers-1.0.tcl
sudo cp /opt/LocalPorts/_resources/port1.0/group/compilers-1.0.tcl /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group
 
  • Like
Reactions: doctor_dog

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
I symlinked gnu coreutil's cp into /bin as a workaround for the initial error.

nmail seems to build find, but throws an error that it can't find CFNetwork framework at the end. See attached log.

With today’s fix nmail should work, I hope :)

(The build was fixed earlier, but the app did not run.)
 

doctor_dog

macrumors regular
Dec 19, 2022
109
107
With today’s fix nmail should work, I hope :)

(The build was fixed earlier, but the app did not run.)
Happy to report nmail builds and runs just fine with your fixes. I had not used or seen pine in at least 25 years, so thank you for the nostalgia =)

1. I do not think it is the case, and as a matter of fact port sync works perfectly fine from Tiger to Sonoma. I never use self update and do not advise using it.

I've used both, mostly self update, with no ill effects (at least none that I am aware of). You're much more of a Macports pro than I am, I thought perhaps you were aware of the reason the manual positions self update and not sync, maybe something I had overlooked.

2. For gcc (or any other custom ports) a convenient way would be to have an overlay repo: https://guide.macports.org/chunked/development.local-repositories.html
Any port in a local repo will override the same port in Macports master, so syncing will not affect it.

I suppose you are right, old GCC aren't gonna get updated often if at all. I would prefer to keep getting updated Portfiles for the newer GCCs, however. I think if I do everything you suggested except doing a local repo for GCC [11:13], it would be manageable to keep the tree up to date without too much manual tinkering.

As always, many thanks for your assistance and continued work on these old PPC machines.
 
  • Like
Reactions: barracuda156

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
I suppose you are right, old GCC aren't gonna get updated often if at all. I would prefer to keep getting updated Portfiles for the newer GCCs, however. I think if I do everything you suggested except doing a local repo for GCC [11:13], it would be manageable to keep the tree up to date without too much manual tinkering.

1. Unfortunately, Macports prefers to revbump compilers’ ports regardless of the arch, which is IMO wasteful and just wrong. In effect, many if not most of those revbumps (for GCC ports, not generally) do literally nothing to you besides wasting many hours of compilation time.
Until someone complains on Trac, it won’t be heard.

2. Another way would be to have your GitHub fork and rebase a tree with fixups against the master. Then just copy needed ports into a local repo.
I do this for some silly mechanical fixes which are safe to do this way: git (a fix for extraction of man), openssl* (a fix to use the correct Perl), m4 (a fix for confdir bug) etc.
 
  • Like
Reactions: doctor_dog

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
Happy to report nmail builds and runs just fine with your fixes. I had not used or seen pine in at least 25 years, so thank you for the nostalgia =)

By the way, I got one more mail client into Macports which should work on PowerPC: rb-sup.
It is based on Ruby, but since you already have a modern gcc, that’s not an issue. It also uses xapian, like nmail.

If you will try it, rb31-sup may be a safer bet for 10.5, though I encourage trying rb33-sup first – and let me know if anything of Ruby stuff fails to build.
(On 10.6 ppc everything builds fine, but I cannot verify on 10.5 at the moment.)
 

Tankerthebuberz

macrumors member
Nov 3, 2023
95
60
By the way, I got one more mail client into Macports which should work on PowerPC: rb-sup.
It is based on Ruby, but since you already have a modern gcc, that’s not an issue. It also uses xapian, like nmail.

If you will try it, rb31-sup may be a safer bet for 10.5, though I encourage trying rb33-sup first – and let me know if anything of Ruby stuff fails to build.
(On 10.6 ppc everything builds fine, but I cannot verify on 10.5 at the moment.)
Nice I’ll give it a shot tonight!
 
  • Like
Reactions: barracuda156

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
Anyone interested in SDL2? This may build: https://ports.macports.org/port/libsdl2-powerpc

A few caveats:
– Other ports do not know about this one yet. So by default it will not be picked. (This will be addressed.)
– I have tested on my 10.6 ppc, but have not tested on 10.5. Please let me know if that fails.
– For 10.6 ppc you will need my fixes for X11 setup (upcoming, but not in Macports master).
– Games are likely not to work with this at the moment due to disabled joystick module (hopefully gets fixed in a while).
 

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
Hi! :)
Direct me to other thread if I'm wrong. Where can I ask some questions about using MacPorts @ PowerMac (G4 MDD)?

You may ask here.

As long as you use 10.5 or 10.4 (i.e. not 10.6 ppc), you may also open a ticket on Macports Trac.

For 10.6 ppc please ask either in discussions section of my GitHub or here in one of dedicated threads.
 

Tratkazir_the_1st

macrumors 65816
Feb 11, 2020
1,034
543
Russia, Moscow region
OK :)
I was trying to build some ported old games (digger & toppler), but build was really long & it failed, can't look & see why. This games were installed really quickly at MacBook A1342. Is G4 MDD ("Canister") not really suitable for software compile? (My main OS on cMPO is Gentoo, so I'm quite used to periodical packages update, around once in 2 weeks :D ). Which compiler suits more for macports@Canister? If I remember correctly - by default it was using gcc4, current version in Gentoo is 12 or 13. And what about GUI for ports management\search ?
 

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
OK :)
I was trying to build some ported old games (digger & toppler), but build was really long & it failed, can't look & see why. This games were installed really quickly at MacBook A1342. Is G4 MDD ("Canister") not really suitable for software compile? (My main OS on cMPO is Gentoo, so I'm quite used to periodical packages update, around once in 2 weeks :D ). Which compiler suits more for macports@Canister? If I remember correctly - by default it was using gcc4, current version in Gentoo is 12 or 13. And what about GUI for ports management\search ?

This is a bit confusing. I have no idea about Gentoo at all. I can recommend OpenBSD, if you rather not spend time building stuff from source. You will also have some newer software than on macOS, though not all.

Macports website works fine in TenFourFox, so I never bothered to find a dedicated GUI to search ports.
You could use local repo (clone it) with Qgit or GitX, if that suits the purpose. Or BBEdit with multi-file search :)
 

barracuda156

macrumors 68020
Original poster
Sep 3, 2021
2,322
1,534
emacs.png
 
  • Like
Reactions: doctor_dog
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.