Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
One Question though: on Debian 12 (ppc) was able to install the required Java version for VISICUT (I think it was 17 or 18), so I could build Vorsicht from source.
Visicut is an open source lasercutter app.



Is it possible to build a more modern version on MP too? I saw in the source repo versions up to 22.

You mean a newer OpenJDK on a MacOS on PowerPC? Good luck with that.

It obviously won’t work if you just try to install it from MacPorts, since JDK needs itself to build, and there are none for ppc. It should be possible (in principle at least) to build JDK versions sequentially (AFAIK, it won’t allow to “jump”), so it will take fixing and building about 10 versions. That will be a huge work.

Keep in mind also, that at least at the moment it builds without GUI. No idea if apps of your interest need that or not.
GUI should be fixable, though not Cocoa, but X11. I sorta have that in plans, but again, it is not something done in one evening.

P. S. If you wonder why something builds easily on Linux but not on MacOS: there are a few software where upstream developers made all possible bad decisions to make it extremely hard to fix anything specifically for MacOS. JDK and Qt are prominent examples. One would think that switching from one GUI to another is a matter of an appropriate configure flag, like it should be in any sanely written software; not in this case. MacOS codepath is hardcoded to use Apple native backend (which obviously gets broken with every next update), so you need to fix every instance, and do that correctly (we also cannot just cheat the build system to believe we are building on Linux, that won’t work, a lot of Linux-specific stuff cannot be supported on MacOS). It could be a matter of configure flag, if upstream did not destroy the code which could support that. But they did.
 
  • Like
Reactions: saxfun
Regarding Visit: openjdk-11-jre is needed, if I'm correct this is the next version after openjdk8? maybe this is possible?

Installing gnumeric, abiword-x11 went well, I cannot start them at this point even after deleting all traces of X11 with the cmds you gave. I'll try to reboot and try again.

Only thing which failed was openjdk8. in your thread regarding openjdk8 you spoke about an easy fix. how is to done?

thanks, saxfun :)
 

Attachments

  • main.txt
    71.7 KB · Views: 42
even after rebooting I cannot get abiword-x11 or gnumeric to start.

with the following cmds I deleted all traces of X11 on my 10.5.8 install:

Code:
sudo rm -rf /usr/X11* /System/Library/Launch*/org.x.* /Applications/Utilities/X11.app /etc/*paths.d/X11
    sudo pkgutil --forget com.apple.pkg.X11DocumentationLeo
    sudo pkgutil --forget com.apple.pkg.X11User
    sudo pkgutil --forget com.apple.pkg.X11SDKLeo
    sudo pkgutil --forget org.x.X11

therefore I cannot start the same approach as @mac57mac57. maybe a reinstall of x11 (via installer disc of leopard) could work? Xorg-server-legacy is installed, but seems to lack some needed links like "ln -s" or something. I did not find any solution googling around.


EDIT: I found X11 (from Xorg-xserver-legacy) in /Applications/MacPorts/ , started it and added "gnumeric" to the appstarter list. I WORKS! I assume I have to always start X11 first, then start the app itself. Maybe there is a possibility to start X11 and the app with a shortcut and (maclike) with an icon?!
 
Last edited:
You mean a newer OpenJDK on a MacOS on PowerPC? Good luck with that.

It obviously won’t work if you just try to install it from MacPorts, since JDK needs itself to build, and there are none for ppc. It should be possible (in principle at least) to build JDK versions sequentially (AFAIK, it won’t allow to “jump”), so it will take fixing and building about 10 versions. That will be a huge work.

Keep in mind also, that at least at the moment it builds without GUI. No idea if apps of your interest need that or not.
GUI should be fixable, though not Cocoa, but X11. I sorta have that in plans, but again, it is not something done in one evening.

P. S. If you wonder why something builds easily on Linux but not on MacOS: there are a few software where upstream developers made all possible bad decisions to make it extremely hard to fix anything specifically for MacOS. JDK and Qt are prominent examples. One would think that switching from one GUI to another is a matter of an appropriate configure flag, like it should be in any sanely written software; not in this case. MacOS codepath is hardcoded to use Apple native backend (which obviously gets broken with every next update), so you need to fix every instance, and do that correctly (we also cannot just cheat the build system to believe we are building on Linux, that won’t work, a lot of Linux-specific stuff cannot be supported on MacOS). It could be a matter of configure flag, if upstream did not destroy the code which could support that. But they did.

Could you say why you try building jdk8u372 and not the current version in the port?
 
I simply typed "sudo port install openjdk8" in the terminal. can I choose a diff. version? I did not edit any repo sources list.
 
even after rebooting I cannot get abiword-x11 or gnumeric to start.

with the following cmds I deleted all traces of X11 on my 10.5.8 install:

Code:
sudo rm -rf /usr/X11* /System/Library/Launch*/org.x.* /Applications/Utilities/X11.app /etc/*paths.d/X11
    sudo pkgutil --forget com.apple.pkg.X11DocumentationLeo
    sudo pkgutil --forget com.apple.pkg.X11User
    sudo pkgutil --forget com.apple.pkg.X11SDKLeo
    sudo pkgutil --forget org.x.X11

therefore I cannot start the same approach as @mac57mac57. maybe a reinstall of x11 (via installer disc of leopard) could work? Xorg-server-legacy is installed, but seems to lack some needed links like "ln -s" or something. I did not find any solution googling around.


EDIT: I found X11 (from Xorg-xserver-legacy) in /Applications/MacPorts/ , started it and added "gnumeric" to the appstarter list. I WORKS! I assume I have to always start X11 first, then start the app itself. Maybe there is a possibility to start X11 and the app with a shortcut and (maclike) with an icon?!

Ok, but what exactly happens?

What happens if you run X app from /Applications/MacPorts? Does it crash? What is the message? If nothing in terminal, you can look into Logs folder, it will have a crash log.
What happens if you run `abiword-x11`?

Does something work with X11 or nothing at all? Does something simple like `feh` start?

(Just in case, you did reboot after wiping out Apple X11? That seems needed.)
 
I simply typed "sudo port install openjdk8" in the terminal. can I choose a diff. version? I did not edit any repo sources list.

Oh well, you may be trying to install a broken port. Sorry, I should have made it explicit. (It was not my decision, MacPorts folks were hesitant to merge 1k+ lines of code patches which no one understood or wanted to read through, so it was suggested to make a separate port for PowerPC; I did not care and also thought it will be easier to maintain. So that was done.)

Please try building `openjdk8-powerpc`.
 
Maybe there is a possibility to start X11 and the app with a shortcut and (maclike) with an icon?!
There is. Mine now works like that. I use Automator to save off a one line shell command as an Application. For me, my MacPorts binaries are in /user/local/bin (I think!). So that "one line shell command" is just:

"/usr/local/bin/AbiWord $1'

with AbiWord being used as an example. Use Automator's File menu to save this off as an Application and it creates AbiWord.app (in this example). You can now also assign AbiWord's icon to the AbiWord.app file if you wish, making it almost indistinguishable from the real thing. You can even drag and drop onto it and it works as expected.

With this done, I double click AbiWord.app and Sorbet starts X11 automatically and then AbiWord... just like a native Mac app except that it also starts X11.

I honestly don't understand how it knows to start X11 first, but it does. I suspect that this has something to do with my unorthodox setup, where I have left Apple's X11 in place, but gutted it's contents and replaced them with the equivalent content from x11-org-legacy.

BTW, note that I have also jury rigged the x11-org-legacy startx script to always open X11 display :0.0, which is what most X11 apps assume. I found that startx had a mechanism in it that on occasion would increment the display number, causing many X11 apps to fail on launch, saying they couldn't find display :0.0.
 
There is. Mine now works like that. I use Automator to save off a one line shell command as an Application. For me, my MacPorts binaries are in /user/local/bin (I think!). So that "one line shell command" is just:

"/usr/local/bin/AbiWord $1'

with AbiWord being used as an example. Use Automator's File menu to save this off as an Application and it creates AbiWord.app (in this example). You can now also assign AbiWord's icon to the AbiWord.app file if you wish, making it almost indistinguishable from the real thing. You can even drag and drop onto it and it works as expected.

With this done, I double click AbiWord.app and Sorbet starts X11 automatically and then AbiWord... just like a native Mac app except that it also starts X11.

I honestly don't understand how it knows to start X11 first, but it does. I suspect that this has something to do with my unorthodox setup, where I have left Apple's X11 in place, but gutted it's contents and replaced them with the equivalent content from x11-org-legacy.

BTW, note that I have also jury rigged the x11-org-legacy startx script to always open X11 display :0.0, which is what most X11 apps assume. I found that startx had a mechanism in it that on occasion would increment the display number, causing many X11 apps to fail on launch, saying they couldn't find display :0.0.

X window should launch automatically without any hacks in fact.
I just run w/e x11/GTK app from the terminal by its name, like `filezilla`, that’s it.

P. S. I hope you did not change MacPorts prefix to /usr/local. One should avoid writing anything into a system prefix.
 
X window should launch automatically without any hacks in fact.
I just run w/e x11/GTK app from the terminal by its name, like `filezilla`, that’s it.

P. S. I hope you did not change MacPorts prefix to /usr/local. One should avoid writing anything into a system prefix.


in fact tastes not working on my powerbook:

if I type in "abiword" or "gnumeric", the following error appears:

"Display could not be opened"


If I start the app X11 first, then select from the "programs" menu the desired app like "gnumeric" it starts!
I'll try @mac57mac57 approach with an automator script.

regarding libass and libass-devel: I cannot compile both of them, failing leads to a lot of broken dependencies like ffmpeg or qmplay2. is there any fix for libass?


@barracuda156: openjdk8-powerpc compiled without any problem! super! is there any chance of getting version 11 are to compile?
 

Attachments

  • main.txt
    239.3 KB · Views: 42
Last edited:
in fact tastes not working on my powerbook:

if I type in "abiword" or "gnumeric", the following error appears:

"Display could not be opened"


If I start the app X11 first, then select from the "programs" menu the desired app like "gnumeric" it starts!
I'll try @mac57mac57 approach with an automator script.

regarding libass and libass-devel: I cannot compile both of them, failing leads to a lot of broken dependencies like ffmpeg or qmplay2. is there any fix for libass?


@barracuda156: openjdk8-powerpc compiled without any problem! super! is there any chance of getting version 11 are to compile?

Re X11: since I cannot test on 10.5, can’t say anything for sure. At least it works, right? I.e. apps open normally with GUI now?

Re libass: please open an issue with upstream: https://github.com/libass/libass
And/or on MacPorts Trac.
(Let me try to dig out which version I had building on 10.5. But it might be the case that you need a newer compiler. I was using gcc11 on 10.5 back then.)

Re openjdk: yes, after someone fixes openjdk9 and opendjk10 :)
 
regarding libass and libass-devel: I cannot compile both of them, failing leads to a lot of broken dependencies like ffmpeg or qmplay2. is there any fix for libass?

You could try installing this. I think it was tested back then. No idea if it gonna work with an archaic libgcc7, but does not hurt trying.

P. S. Sorry for a silly tbz2.zip, but this forum cannot handle Unix archive files, apparently. Extract it and then install.
 

Attachments

  • libass-0.15.2_0.darwin_9.ppc.tbz2.zip
    151 KB · Views: 42
You could try installing this. I think it was tested back then. No idea if it gonna work with an archaic libgcc7, but does not hurt trying.

P. S. Sorry for a silly tbz2.zip, but this forum cannot handle Unix archive files, apparently. Extract it and then install.
Thanks. How to install? if I use unzip, I have folders. port install won't install the whole file. do I have to create an local repo?
 
Re X11: since I cannot test on 10.5, can’t say anything for sure. At least it works, right? I.e. apps open normally with GUI now?

Re libass: please open an issue with upstream: https://github.com/libass/libass
And/or on MacPorts Trac.
(Let me try to dig out which version I had building on 10.5. But it might be the case that you need a newer compiler. I was using gcc11 on 10.5 back then.)

Re openjdk: yes, after someone fixes openjdk9 and opendjk10 :)


opened a ticket at GitHub:


btw. I tried to put your archive into

1./opt/local/var/macports/incoming/verified

2. /opt/local/var/macports/software/libass (I created this folder)


but no avail.

on netbsd there is pekin, on debian apt-get, so you can install local files easily. but with MP I don't know how to do this.
 
btw. I tried to put your archive into
1./opt/local/var/macports/incoming/verified
2. /opt/local/var/macports/software/libass (I created this folder)

It should have been unpacked from zip, but kept in tbz2 (assuming you use bzip2 for archive formats). Putting anything to software will not work.
MacPorts has 0.17.2 now, so of course you also need to modify portfile to have 0.15.2 instead.
 
opened a ticket at GitHub:


As a quick fix to the code, change this: https://github.com/libass/libass/bl...f5e67cffaf11f0/libass/ass_coretext.c#L94-L113

Code:
#ifdef __MAC_10_6
    // Declared in SDKs since 10.6, including iOS SDKs
    else if (CHECK_AVAILABLE(kCTFontURLAttribute, macOS 10.6, *)) {
        url = CTFontDescriptorCopyAttribute(fontd, kCTFontURLAttribute);
    }
#endif
#if !TARGET_OS_IPHONE && (!defined(__MAC_10_6) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6)
    // ATS is declared deprecated in newer macOS SDKs
    // and not declared at all in iOS SDKs
    else {
        CTFontRef font = CTFontCreateWithFontDescriptor(fontd, 0, NULL);
        if (!font)
            return NULL;
        ATSFontRef ats_font = CTFontGetPlatformFont(font, NULL);
        FSRef fs_ref;
        if (ATSFontGetFileReference(ats_font, &fs_ref) == noErr)
            url = CFURLCreateFromFSRef(NULL, &fs_ref);
        CFRelease(font);
    }
#endif

To:
Code:
    // ATS is declared deprecated in newer macOS SDKs
    // and not declared at all in iOS SDKs
    else {
        CTFontRef font = CTFontCreateWithFontDescriptor(fontd, 0, NULL);
        if (!font)
            return NULL;
        ATSFontRef ats_font = CTFontGetPlatformFont(font, NULL);
        FSRef fs_ref;
        if (ATSFontGetFileReference(ats_font, &fs_ref) == noErr)
            url = CFURLCreateFromFSRef(NULL, &fs_ref);
        CFRelease(font);
    }
 
One other thing to note is that the "startx" script can open displays other than :0.0. It can selectively increment the display number and open :0.1, :0.2, etc. Most folks typically have an "export DISPLAY=:0.0" type statement in their .bash_profile (or similar, depending on the shell you use) which won't work if the actual display is, say, :0.5.

You can work around it by editing "startx" and forcing the chosen display to be :0.0..

Alternately, at a command prompt, type:

ps -ef

and near the end of the output you will see the X11 processes. Note the display number from that output and re-export DISPLAY using the current number.

This works, but must be done every time... annoying. Hence my edit of startx to make it always choose the default.
 
I hesitate to put this here because I don't want to send you down the wrong path but I'll add yet even more commentary to this thread: check which X11 system you are using. In other words, is it the native, default Apple X11? Or are you using XQuartz? Macports can and does make a distinction between +x11 variants and +xquartz variants and I've had instances where a Macports app wouldn't launch into the GUI because it was looking for X11 vs. XQuartz or vice versa.
 
I hesitate to put this here because I don't want to send you down the wrong path but I'll add yet even more commentary to this thread: check which X11 system you are using. In other words, is it the native, default Apple X11? Or are you using XQuartz? Macports can and does make a distinction between +x11 variants and +xquartz variants and I've had instances where a Macports app wouldn't launch into the GUI because it was looking for X11 vs. XQuartz or vice versa.

You confuse things here. MacPorts “quartz” has nothing to do with XQuartz, but rather means native Cocoa GUI. XQuartz was a continuation of Apple X11.

An app built with +quartz will just launch without relying on X server. In most cases that just won’t build on ppc though (some components do, but what is the point). So as a general rule: avoid Cocoa, choose X11. For X11 use MacPorts xorg-server and not Apple/XQuartz.
 
Ohhh dang, ok now I'm really confused. I had a port that I had to deliberately do -x11 and +xquartz on, maybe that was a fluke? Let me try and figure out which package it was.
 
Ohhh dang, ok now I'm really confused. I had a port that I had to deliberately do -x11 and +xquartz on, maybe that was a fluke? Let me try and figure out which package it was.

Let me be clear, I do not make a claim that no existing port can possibly build and work as `-x11 +quartz` (there are no +xquartz variants, AFAIK). Maybe some will, I just do not know of such. At least what I did try failed, because essential dependencies do not build (I recall, gtk3 itself does not, which means nothing using gtk will – unless, maybe, you use an archaic gtk2).

There are a few (perhaps very few) which can build with +quartz+x11: you do not need to keep rebuilding those or activating/deactivating. Those build this way be default. This is one example:
Code:
svacchanda@43-177 ~ % port deps cairo
Full Name: cairo @1.17.6_2+quartz+x11
Extract Dependencies: xz
Build Dependencies:   pkgconfig
Library Dependencies: libpixman, glib2, fontconfig, freetype, libpng, zlib,
                      expat, xrender, xorg-libXext, xorg-xcb-util

By the way, wxWidgets with native GUI are completely broken on < 10.7 (if not < 10.8). Ports using those will build and even launch usually, but won’t work. So instead wxGTK must be used – that works beautifully.
I have fixed this for some ports which I wanted to use, but it may not be fixed elsewhere.
 
  • Like
Reactions: doctor_dog
As a quick fix to the code, change this: https://github.com/libass/libass/bl...f5e67cffaf11f0/libass/ass_coretext.c#L94-L113

Code:
#ifdef __MAC_10_6
    // Declared in SDKs since 10.6, including iOS SDKs
    else if (CHECK_AVAILABLE(kCTFontURLAttribute, macOS 10.6, *)) {
        url = CTFontDescriptorCopyAttribute(fontd, kCTFontURLAttribute);
    }
#endif
#if !TARGET_OS_IPHONE && (!defined(__MAC_10_6) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6)
    // ATS is declared deprecated in newer macOS SDKs
    // and not declared at all in iOS SDKs
    else {
        CTFontRef font = CTFontCreateWithFontDescriptor(fontd, 0, NULL);
        if (!font)
            return NULL;
        ATSFontRef ats_font = CTFontGetPlatformFont(font, NULL);
        FSRef fs_ref;
        if (ATSFontGetFileReference(ats_font, &fs_ref) == noErr)
            url = CFURLCreateFromFSRef(NULL, &fs_ref);
        CFRelease(font);
    }
#endif

To:
Code:
    // ATS is declared deprecated in newer macOS SDKs
    // and not declared at all in iOS SDKs
    else {
        CTFontRef font = CTFontCreateWithFontDescriptor(fontd, 0, NULL);
        if (!font)
            return NULL;
        ATSFontRef ats_font = CTFontGetPlatformFont(font, NULL);
        FSRef fs_ref;
        if (ATSFontGetFileReference(ats_font, &fs_ref) == noErr)
            url = CFURLCreateFromFSRef(NULL, &fs_ref);
        CFRelease(font);
    }
Thanks for your fix. ich changed the passage accordingly but dont know where to put the file ass_coretext.c
your binary does not include such a file.
also, i don't know how to change (which) portfile from version 0.17 to 0.15.
ssems cryptic to me, though i'm not a coder. helpless here.

EDIT: GitHub Page updated.
 
Last edited:
Thanks for your fix. ich changed the passage accordingly but dont know where to put the file ass_coretext.c
your binary does not include such a file.
also, i don't know how to change (which) portfile from version 0.17 to 0.15.
ssems cryptic to me, though i'm not a coder. helpless here.

To try installing my binary edit the portfile, do not mess up the binary itself )
Assuming you have TextWrangler installed:
Code:
/usr/local/bin/edit `port file libass`
(For BBEdit the command will be bbedit, rest is the same.)

To build from source the current version, do not modify portfile, instead edit the source as suggested above. MacPorts build directory will be /opt/local/var/macports/build/. You will see some folder which long ugly name ends with libass (likely _opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_libass). Go there, you will see extracted source, libass. Needed file is located where it is on GitHub.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.