Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.
Portfile edited, how to patch "‎multimedia/VLC2/files/patch-SystemConfiguration.diff" ???? Where to locate and run?

Thanks, saxfun. ;)

cd ./files (inside directory with Portfile)
edit patch-SystemConfiguration.diff (assuming TextWrangler)
Copy-paste this into the newly created document, close with saving:

Or extract attached file and drag it into the same files folder.
 

Attachments

  • patch-SystemConfiguration.diff.zip
    1.5 KB · Views: 23
it failed again, log attached.

EDIT: compiling again, edited netconf.c second time after cleaning before.

EDIT2: failed gain, new log.
 

Attachments

  • vlc2.1.txt
    1.7 MB · Views: 17
Last edited:
EDIT: compiling again, edited netconf.c second time after cleaning before.

EDIT2: failed gain, new log.

Okay, this may be not easy to fix, I am not sure what it can be replaced with, however this happens in an optional module, which is nothing essential (screencapture).

Could you add `--disable-screen` anywhere to configure args in the portfile? From line 276 and below there are a few chunks of arguments, add it there.

Unfortunately, this will require port clean and a new build.

UPD. A neater way to do this: https://github.com/macports/macports-ports/commit/2bef727d14b2bdeecc950dd1bd437f94192b50ff
 
Last edited:
By the way: I tried to compile Claws-mail too, but pulse audio failed. I found a diff and a edited Portfile from you, edited it but pusleaudio seems to be broken for me on 10.5.8

Shall I attach a log?
 
Did it the first way.

Failed.

Thank you. `AudioComponent` and friends are present in 10.6+, so the error is not surprising, no one just ever tried to build this on 10.5.

I will see what can be done about it.
 
By the way: I tried to compile Claws-mail too, but pulse audio failed. I found a diff and a edited Portfile from you, edited it but pusleaudio seems to be broken for me on 10.5.8

Shall I attach a log?

I rather suggest to edit `libcanberra` portfile: delete pulseaudio from dependencies, add `--disable-pulse` to configure args. It is largely a Linux thing and I could never make it work on macOS, even on modern one. (It builds, but playback is broken.)
It should be a variant there, not the default, I think. But just remove it for now.
 
Crazy MP-hell . . . libcanberra failed though.

No Backend . . .
 

Attachments

  • can.txt
    446.9 KB · Views: 16
Crazy MP-hell . . . libcanberra failed though.

No Backend . . .

Oh, okay, it needs one of backends, so on macOS is it either pulse or gstreamer, and the latter may be a pain to build if you do not have it already.

Let’s see why pulseaudio fails, I will check the log if you share it.
 
  • Like
Reactions: saxfun
Thank you. `AudioComponent` and friends are present in 10.6+, so the error is not surprising, no one just ever tried to build this on 10.5.

I will see what can be done about it.

@saxfun Could you edit this file and just restart the build (it should pick it up from here)?
Code:
--- modules/audio_output/auhal.c    2015-10-22 00:10:00
+++ modules/audio_output/auhal.c    2024-10-12 00:07:55
@@ -91,7 +91,7 @@
     TPCircularBuffer            circular_buffer;    /* circular buffer to swap the audio data */
 
     /* AUHAL specific */
-    AudioComponent              au_component;       /* The AudioComponent we use */
+    Component                   au_component;       /* The AudioComponent we use */
     AudioUnit                   au_unit;            /* The AudioUnit we use */
 
     /* CoreAudio SPDIF mode specific */
@@ -488,7 +488,7 @@
     OSStatus                    err = noErr;
     UInt32                      i_param_size = 0;
     int                         i_original;
-    AudioComponentDescription   desc;
+    ComponentDescription        desc;
     AudioStreamBasicDescription DeviceFormat;
     AudioChannelLayout          *layout;
     AURenderCallbackStruct      input;
@@ -505,13 +505,13 @@
     desc.componentFlags = 0;
     desc.componentFlagsMask = 0;
 
-    p_sys->au_component = AudioComponentFindNext(NULL, &desc);
+    p_sys->au_component = FindNextComponent(NULL, &desc);
     if (p_sys->au_component == NULL) {
         msg_Err(p_aout, "cannot find any HAL component, PCM output failed");
         return false;
     }
 
-    err = AudioComponentInstanceNew(p_sys->au_component, &p_sys->au_unit);
+    err = OpenAComponent(p_sys->au_component, &p_sys->au_unit);
     if (err != noErr) {
         msg_Err(p_aout, "cannot open HAL component, PCM output failed [%4.4s]", (char *)&err);
         return false;
@@ -1112,7 +1112,7 @@
     if (p_sys->au_unit) {
         verify_noerr(AudioOutputUnitStop(p_sys->au_unit));
         verify_noerr(AudioUnitUninitialize(p_sys->au_unit));
-        verify_noerr(AudioComponentInstanceDispose(p_sys->au_unit));
+        verify_noerr(CloseComponent(p_sys->au_unit));
     }
 
     if (p_sys->b_digital) {

UPD. As a commit, putting all three fixes together: https://github.com/barracuda156/powerpc-ports/commit/6dbb7f0fa1ca9e54524c836ecf41bbf6efb6cc28
 
Last edited:
  • Like
Reactions: saxfun
Thanks for editing. I'll check tomorrow. attached the log for pulse audio.
 

Attachments

  • pulse.txt
    201 KB · Views: 23
Last edited:
@saxfun Could you edit this file and just restart the build (it should pick it up from here)?
Code:
--- modules/audio_output/auhal.c    2015-10-22 00:10:00
+++ modules/audio_output/auhal.c    2024-10-12 00:07:55
@@ -91,7 +91,7 @@
     TPCircularBuffer            circular_buffer;    /* circular buffer to swap the audio data */
 
     /* AUHAL specific */
-    AudioComponent              au_component;       /* The AudioComponent we use */
+    Component                   au_component;       /* The AudioComponent we use */
     AudioUnit                   au_unit;            /* The AudioUnit we use */
 
     /* CoreAudio SPDIF mode specific */
@@ -488,7 +488,7 @@
     OSStatus                    err = noErr;
     UInt32                      i_param_size = 0;
     int                         i_original;
-    AudioComponentDescription   desc;
+    ComponentDescription        desc;
     AudioStreamBasicDescription DeviceFormat;
     AudioChannelLayout          *layout;
     AURenderCallbackStruct      input;
@@ -505,13 +505,13 @@
     desc.componentFlags = 0;
     desc.componentFlagsMask = 0;
 
-    p_sys->au_component = AudioComponentFindNext(NULL, &desc);
+    p_sys->au_component = FindNextComponent(NULL, &desc);
     if (p_sys->au_component == NULL) {
         msg_Err(p_aout, "cannot find any HAL component, PCM output failed");
         return false;
     }
 
-    err = AudioComponentInstanceNew(p_sys->au_component, &p_sys->au_unit);
+    err = OpenAComponent(p_sys->au_component, &p_sys->au_unit);
     if (err != noErr) {
         msg_Err(p_aout, "cannot open HAL component, PCM output failed [%4.4s]", (char *)&err);
         return false;
@@ -1112,7 +1112,7 @@
     if (p_sys->au_unit) {
         verify_noerr(AudioOutputUnitStop(p_sys->au_unit));
         verify_noerr(AudioUnitUninitialize(p_sys->au_unit));
-        verify_noerr(AudioComponentInstanceDispose(p_sys->au_unit));
+        verify_noerr(CloseComponent(p_sys->au_unit));
     }
 
     if (p_sys->b_digital) {

UPD. As a commit, putting all three fixes together: https://github.com/barracuda156/powerpc-ports/commit/6dbb7f0fa1ca9e54524c836ecf41bbf6efb6cc28


How to edit exactly? paste the whole block in? Or edit the lines, minus means delete, plus means add. for me a least it is not so obvious in this case.
 
Last edited:
  • Like
Reactions: barracuda156
Just replace those specific lines (leaving out the leading +, of course).
In effect, it just replace AudioComponet with Component etc. Otherwise the code stays the same.

The patch reverts this commit: https://github.com/videolan/vlc/commit/5e59f5f48dac111013b48a0afc22fdc8f4e627f4 (check it, may be it is clearer what to do then).

failed. I edited the auhal.c file in the work dir, so I did not clean the build before installing again.

this time a diff. error.
 

Attachments

  • vlc2.txt
    3 MB · Views: 18
failed. I edited the auhal.c file in the work dir, so I did not clean the build before installing again.

this time a diff. error.

I think this was already fixed in this commit, but you are building an outdated version.
Please sync ports, VLC2 should be 2.2.8_19, not 2.2.8_18.

P. S. To avoid rebuilding all outdated dependencies, use `sudo port -v -n install VLC2`, then it will only build VLC2 itself.
 
Last edited:
if I understand you correctly, just type in your command without syncing all ports (and loosing all edits on gcc etc.)?
 
if I understand you correctly, just type in your command without syncing all ports (and loosing all edits on gcc etc.)?

Wait. What I meant is how to avoid rebuilding ports, but port sync will still discard all local modifications to port groups etc.

It will be faster to just replace VLC2 portfile manually then, avoiding port sync.

Can you just extract this and replace VLC2 folder inside multimedia? Do not do port sync, just port clean and then run the build.
 

Attachments

  • VLC2.zip
    52.9 KB · Views: 19
  • Like
Reactions: saxfun
fixef netconf.c, auhal.c and compiled with your files.

sw_scale error IMHO.

log attached.
 

Attachments

  • vlc3.txt
    2 MB · Views: 16
fixef netconf.c, auhal.c and compiled with your files.

sw_scale error IMHO.

log attached.

Ok, sorry, then it might be something 10.5 SDK-specific. Anyway, I will add a quick fix now, passing the flag should work.

UPD. I guess this is a real bug, which somehow only shown up on your set-up. Thank you, this is generally helpful.
Upstream seems to have addressed it in https://github.com/videolan/vlc/commit/ab00e6c59d42e05ab08893091783d8b5febc0058
I will make a patch, or you could just edit that file accordingly. No need to do the build from scratch, hopefully this works.

UPD2. I am a bit puzzled. The portfile has a patch backport-fixes.patch but your log does not show it being used, and the code looks as if patch was not applied. That will break things.
Just to be clear, did you do `sudo port clean VLC2` before running the build with my portfile?
I will try to figure why the patch could be skipped.
 
Last edited:
fixef netconf.c, auhal.c and compiled with your files.

sw_scale error IMHO.

log attached.

THB it looks like portfile code should have worked.
I request you to do a complete clean up:

sudo port clean —all VLC2

This will delete everything of VLC2. And then run installation.

Perhaps patch did not apply because we skipped port sync. It should be applied, otherwise it won’t work.

You can do this first and make sure patch is used:

sudo port -v -n patch VLC2
 
I did cleaning up and patching. Now installing "port -v install VLC2" ?
 

Attachments

  • patch.txt
    20.9 KB · Views: 20
Again error at netconf.c, is it not patched? do I have to manually edit netconf.c again in the src dir?

Code:
darwin/netconf.c:78:31: error: initialization of 'CFDictionaryRef' {aka 'const struct __CFDictionary *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
darwin/netconf.c:84:47: error: 'kSCPropNetProxiesHTTPEnable' undeclared (first use in this function); did you mean 'kCFNetworkProxiesHTTPEnable'?
   84 |                                               kSCPropNetProxiesHTTPEnable);
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               kCFNetworkProxiesHTTPEnable
darwin/netconf.c:84:47: note: each undeclared identifier is reported only once for each function it appears in
darwin/netconf.c:94:55: error: 'kSCPropNetProxiesHTTPProxy' undeclared (first use in this function)
   94 |                                                       kSCPropNetProxiesHTTPProxy);
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
darwin/netconf.c:99:57: error: 'kSCPropNetProxiesHTTPPort' undeclared (first use in this function)
   99 |                                                         kSCPropNetProxiesHTTPPort);
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from darwin/netconf.c:28:
../include/vlc_common.h: At top level:
../include/vlc_common.h:829:13: warning: 'vlc_free' defined but not used [-Wunused-function]
  829 | static void vlc_free(void *ptr)
      |             ^~~~~~~~
make[3]: *** [darwin/netconf.lo] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC2/VLC2/work/vlc-2.2.8/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC2/VLC2/work/vlc-2.2.8/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC2/VLC2/work/vlc-2.2.8'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC2/VLC2/work/vlc-2.2.8'

Where to edit the file for success? src dir or work dir?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.