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

Steve030

macrumors newbie
Original poster
Oct 20, 2020
24
11
Hi, I'd like to compile for PPC. I tried the most obvious/easy route and tried installing via Macports, but it said Intel x86 only. I was surprised as I have Barrier compiled for MIPS, so surely it must be possible to compile for PPC?

If it is possible, could someone could help out?

(I realise there are binaries of Synergy floating about, but Synergy isn't compatible with Barrier & Barrier is currently supported open source varient, so it is *the* one to have a PPC port for)

 

Steve030

macrumors newbie
Original poster
Oct 20, 2020
24
11
It looks like some of Barrier's dependencies are Intel only. qt5-qtbase and clang-9.0.

Thanks pipetogrep,

I think there must be a work-around available since someone recently ported Barrier to SGI IRIX/MIPS. Apparently they had to mess around with the cmake script, but they haven't given me much information besides this.

In regards to targetting the later build of OSX, do you think this is a deal-breaker entirely? Or can it be re-targetted to an earlier OS? Especially since the X components rarely change.
 

pipetogrep

macrumors 6502
Jan 27, 2021
282
434
Would you happen to know where that IRIX version's source code is? It may be useful to diff it against the current source and see what changes they made.
 

Steve030

macrumors newbie
Original poster
Oct 20, 2020
24
11

pipetogrep

macrumors 6502
Jan 27, 2021
282
434
Here we are my friend:

They use the fedora RPM system, but source and spec files are there.
Interesting. The removed qt5 as a build requirement https://github.com/sgidevnet/sgug-rse/blob/wip-testing/packages/barrier/SPECS/barrier.spec#L19

They also made a few minor patches here. https://github.com/sgidevnet/sgug-r...ckages/barrier/SOURCES/barrier.sgifixes.patch

I wonder if it's being used as CLI only, which isn't that difficult.
 

pipetogrep

macrumors 6502
Jan 27, 2021
282
434
Once I get done with my current TenFourFox build, I think I'll take a crack at this.
 

pipetogrep

macrumors 6502
Jan 27, 2021
282
434
I’ve started this. I’m currently compiling pkgconfig, cmake, OpenSSL, and gtest. That’ll take a day or so. I’m doing it under a separate macports prefix. If this works, I’ll package it up into an installer with a script you can use to build it yourself.
 
  • Like
Reactions: Steve030

Steve030

macrumors newbie
Original poster
Oct 20, 2020
24
11
I’ve started this. I’m currently compiling pkgconfig, cmake, OpenSSL, and gtest. That’ll take a day or so. I’m doing it under a separate macports prefix. If this works, I’ll package it up into an installer with a script you can use to build it yourself.
Thank you so much!!
 

pipetogrep

macrumors 6502
Jan 27, 2021
282
434
Some progress but no success yet. Here's what has been done:
  1. Created a local copy of the Barrier Portfile
  2. Removed the QT5 dependency from said Portfile
  3. Added "-DBARRIER_BUILD_GUI=OFF" and "-DBARRIER_BUILD_TESTS=OFF" to "configure.pre_args-append" in the Portfile.
  4. Added "configure.compiler macports-gcc-7" to the Portfile to resolve the "Target 'server' requires the language dialect 'CXX14'..." errors.
After that, it build 83% of the way then fails. This is what I'm seeing in the log.

Code:
:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
:info:build  #import <CoreFoundation/CoreFoundation.h>
:info:build   ^~~~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/./lib/platform/OSXMediaKeySupport.h:21:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
:info:build  #import <Carbon/Carbon.h>
:info:build   ^~~~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXEventQueueBuffer.cpp:86:14: warning: multi-character character constant [-Wmultichar]
:info:build          case 'Syne':
:info:build               ^~~~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXEventQueueBuffer.cpp:104:29: warning: multi-character character constant [-Wmultichar]
:info:build                              'Syne',
:info:build                              ^~~~~~
:info:build [ 83%] Building C object src/lib/platform/CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o
:info:build cd /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build/src/lib/platform && /opt/macports-barrier/bin/gcc-mp-7 -DBARRIER_BUILD_DATE=\"20211005\" -DBARRIER_BUILD_NUMBER=1 -DBARRIER_REVISION=\"00000000\" -DBARRIER_VERSION=\"2.3.3-release\" -DBARRIER_VERSION_STRING=\"2.3.3-release-release\" -DHAVE_CONFIG_H -DNDEBUG -DSYSAPI_UNIX=1 -DWINAPI_CARBON=1 -D_THREAD_SAFE -I/opt/macports-barrier/include -I/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/./lib -I/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build/src/lib -pipe -Os -DNDEBUG -I/opt/macports-barrier/include -arch ppc -mmacosx-version-min=10.5 -MD -MT src/lib/platform/CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o -MF CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o.d -o CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o -c /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m: In function 'convertKeyIDToNXKeyType':
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:36:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioUp:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:39:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioDown:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:42:2: error: case label does not reduce to an integer constant
:info:build   case kKeyBrightnessUp:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:45:2: error: case label does not reduce to an integer constant
:info:build   case kKeyBrightnessDown:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:48:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioMute:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:51:2: error: case label does not reduce to an integer constant
:info:build   case kKeyEject:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:54:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioPlay:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:57:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioNext:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:60:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioPrev:
:info:build   ^~~~
:info:build make[2]: *** [src/lib/platform/CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build make[2]: Leaving directory `/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build'
:info:build make[1]: *** [src/lib/platform/CMakeFiles/platform.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build'
:info:build Command failed:  cd "/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build" && /usr/bin/make -j2 -w all VERBOSE=ON
:info:build Exit code: 2
:error:build Failed to build barrier: command execution failed
:debug:build Error code: CHILDSTATUS 4491 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/macports-barrier/var/macports/logs/_Users_chris_dev_ports_aqua_barrier/barrier/main.log for details.
 

pipetogrep

macrumors 6502
Jan 27, 2021
282
434
Looks like those errors are due to GCC7 not compiling the code as Objective-C. Looking into how to resolve that.
 

Steve030

macrumors newbie
Original poster
Oct 20, 2020
24
11
Looks like those errors are due to GCC7 not compiling the code as Objective-C. Looking into how to resolve that.
Ok cheers, if you get really stuck let me know I'll ask some guys who did the MIPS version and see what they think.
 

pipetogrep

macrumors 6502
Jan 27, 2021
282
434
Ok cheers, if you get really stuck let me know I'll ask some guys who did the MIPS version and see what they think.
I'm still poking at it but will be giving it a break for a day or two. Here's what I've learned so far, though.

Building with the default GCC 4.2 isn't feasible as it is too old. It does not support CXX14 which appears to be a C++ dialect. I worked around that by telling it to use Macports GCC7 compiler.

The Macports GCC7 compiler is complaining (see my previous post) because the case statements here reference constant variables instead of hard coded values. That's not legal in regular C but it is in Objective-C, so I don't know why it's complaining about it as that should be fine. For the time being, I've stripped out media key support just to see if I could get it to compile with the intention to fix it later.

That worked, but then I encountered "-fobjc-exceptions is required to enable Objective-C exception syntax" errors due to the use of @try, @Catch, @Finally. I added that compile flag to the Portfile and it got to 87% compiled.

Now I'm running into errors that say "error: cannot convert 'objc_object *' to 'double' in initialization". I stopped there for now. And will try again tomorrow.

Full disclaimer, I have zero prior experience with Objective-C and come from a web development so this isn't my wheelhouse, but I'm learning a fair amount about patching Portfiles from this experience. Here's the thing, @Steve030. None of the issues so far have been related to the Barrier C code itself. They've all been in the 0.12% of the code that is Objective-C and OS-X specific. So I think that all of these are strictly Mac related Objective-C issues.
1633530113107.png


I did take a full diff of the Irix code base and the original Barrier source code. It looks like all their changes are Irix and X11 specific so none of them really apply here.

Either way, I'm hopeful that I can get this working. Some help would certainly be appreciated. Hopefully all this info can help someone else figure out what needs to be done.
 
Last edited:

pipetogrep

macrumors 6502
Jan 27, 2021
282
434
Further work on this. I'm using this thread as a dev log at this point :p.

There were some deprecated Objective-C functions/libraries that were removed from Barrier. Since we're building this for Leopard, they aren't deprecated. Here's where the source of the current compile issues lie. https://github.com/debauchee/barrie...2960c94c8329694969d33b78075234a30c7a66b42R532

The comment for that commit is "Remove deprecated NXClickTime call". I'm trying to put in the code from before that was removed to see how it handles.
 

kencu

macrumors member
Jan 23, 2019
92
110
Most people who are trying to build MacPorts ports and run into trouble, especially when it comes to older systems, powerpc support, and such, find the most useful place to post up their issues and find help for them is in the MacPorts trac system.

It is designed for this, and followed carefully by people who are knowledgable and invested in the outcomes, for the most part.

There are something like 65,000 tickets in that trac system, most of them resolved successfully. People there have been fixing MacPorts build issues since 2006 or so.

So you might consider putting your MacPorts build issues there, where your chance of finding a helpful soul is reasonably high.

You don't need any new username or password to use it -- it uses your github information. It works just great with TenFourFox and similar browsers; no issues with async/await or other modern browser headaches.

 

pipetogrep

macrumors 6502
Jan 27, 2021
282
434
@Steve030 Not yet. I got sidetracked trying to get the PowerPC JIT DOSBox patches into Boxer. I’m hitting a wall with that so I’ll be switching back to barrier again. First thing I’ll do is request help on the Macports trac system.
 
  • Like
Reactions: Steve030

barracuda156

macrumors 68000
Sep 3, 2021
1,734
1,267
Some progress but no success yet. Here's what has been done:
  1. Created a local copy of the Barrier Portfile
  2. Removed the QT5 dependency from said Portfile
  3. Added "-DBARRIER_BUILD_GUI=OFF" and "-DBARRIER_BUILD_TESTS=OFF" to "configure.pre_args-append" in the Portfile.
  4. Added "configure.compiler macports-gcc-7" to the Portfile to resolve the "Target 'server' requires the language dialect 'CXX14'..." errors.
After that, it build 83% of the way then fails. This is what I'm seeing in the log.

Code:
:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
:info:build  #import <CoreFoundation/CoreFoundation.h>
:info:build   ^~~~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/./lib/platform/OSXMediaKeySupport.h:21:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
:info:build  #import <Carbon/Carbon.h>
:info:build   ^~~~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXEventQueueBuffer.cpp:86:14: warning: multi-character character constant [-Wmultichar]
:info:build          case 'Syne':
:info:build               ^~~~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXEventQueueBuffer.cpp:104:29: warning: multi-character character constant [-Wmultichar]
:info:build                              'Syne',
:info:build                              ^~~~~~
:info:build [ 83%] Building C object src/lib/platform/CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o
:info:build cd /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build/src/lib/platform && /opt/macports-barrier/bin/gcc-mp-7 -DBARRIER_BUILD_DATE=\"20211005\" -DBARRIER_BUILD_NUMBER=1 -DBARRIER_REVISION=\"00000000\" -DBARRIER_VERSION=\"2.3.3-release\" -DBARRIER_VERSION_STRING=\"2.3.3-release-release\" -DHAVE_CONFIG_H -DNDEBUG -DSYSAPI_UNIX=1 -DWINAPI_CARBON=1 -D_THREAD_SAFE -I/opt/macports-barrier/include -I/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/./lib -I/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build/src/lib -pipe -Os -DNDEBUG -I/opt/macports-barrier/include -arch ppc -mmacosx-version-min=10.5 -MD -MT src/lib/platform/CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o -MF CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o.d -o CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o -c /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m: In function 'convertKeyIDToNXKeyType':
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:36:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioUp:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:39:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioDown:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:42:2: error: case label does not reduce to an integer constant
:info:build   case kKeyBrightnessUp:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:45:2: error: case label does not reduce to an integer constant
:info:build   case kKeyBrightnessDown:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:48:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioMute:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:51:2: error: case label does not reduce to an integer constant
:info:build   case kKeyEject:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:54:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioPlay:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:57:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioNext:
:info:build   ^~~~
:info:build /opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/barrier-2.3.3/src/lib/platform/OSXMediaKeySimulator.m:60:2: error: case label does not reduce to an integer constant
:info:build   case kKeyAudioPrev:
:info:build   ^~~~
:info:build make[2]: *** [src/lib/platform/CMakeFiles/platform.dir/OSXMediaKeySimulator.m.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build make[2]: Leaving directory `/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build'
:info:build make[1]: *** [src/lib/platform/CMakeFiles/platform.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build'
:info:build Command failed:  cd "/opt/macports-barrier/var/macports/build/_Users_chris_dev_ports_aqua_barrier/barrier/work/build" && /usr/bin/make -j2 -w all VERBOSE=ON
:info:build Exit code: 2
:error:build Failed to build barrier: command execution failed
:debug:build Error code: CHILDSTATUS 4491 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/macports-barrier/var/macports/logs/_Users_chris_dev_ports_aqua_barrier/barrier/main.log for details.

Yeah, I am getting the same failure.

P. S. A required dependency `ghc-filesystem` is likely to fail to build as-is, add this to Portfile:

Code:
configure.args-append -DGHC_FILESYSTEM_BUILD_TESTING=OFF

UPD. Actually ghc-filesystem has built.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.