Gcenx / macports-wine

Updated wine Portfiles for macports
90 stars 11 forks source link

Unable to build libvpx when installing wine-stable #130

Closed ehrmann closed 2 months ago

ehrmann commented 3 months ago

I grabbed a fresh copy of macports-wine and updated all my outdated ports before trying this. When I try to install wine-stable, libvpx won't build:

# /opt/local/bin/port install wine-stable
--->  Computing dependencies for libvpx
--->  Fetching archive for libvpx
--->  Attempting to fetch libvpx-1.13.1_0+universal.darwin_23.arm64-x86_64.tbz2 from http://mirror.fcix.net/macports/packages/libvpx
--->  Attempting to fetch libvpx-1.13.1_0+universal.darwin_23.arm64-x86_64.tbz2 from https://packages.macports.org/libvpx
--->  Attempting to fetch libvpx-1.13.1_0+universal.darwin_23.arm64-x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/libvpx
--->  Fetching distfiles for libvpx
--->  Verifying checksums for libvpx
--->  Extracting libvpx
--->  Applying patches to libvpx
--->  Configuring libvpx
--->  Building libvpx                                    
Error: Failed to build libvpx: command execution failed  
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_libvpx/libvpx/main.log for details.
Error: Unable to execute port wine-stable: upgrade gstreamer1-gst-plugins-good failed

I think this is the relevant part of the log file. It looks like libvpx was built for arm, but needs to be x86_64 for wine:

:info:build /usr/bin/clang++ -L/opt/local/lib -Wl,-headerpad_max_install_names -Os -stdlib=libc++ -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk -m64 -arch x86_64 -o test_libvpx ivfenc.c.o md5_utils.
c.o test/active_map_refresh_test.cc.o test/active_map_test.cc.o test/alt_ref_aq_segment_test.cc.o test/altref_test.cc.o test/aq_segment_test.cc.o t
est/bench.cc.o test/borders_test.cc.o test/byte_alignment_test.cc.o test/config_test.cc.o test/cpu_speed_test.cc.o test/cq_test.cc.o test/decode_ap
i_test.cc.o test/decode_corrupted.cc.o test/decode_svc_test.cc.o test/decode_test_driver.cc.o test/encode_api_test.cc.o test/encode_test_driver.cc.
o test/error_resilience_test.cc.o test/external_frame_buffer_test.cc.o test/frame_size_tests.cc.o test/invalid_file_test.cc.o test/keyframe_test.cc
.o test/level_test.cc.o test/realtime_test.cc.o test/resize_test.cc.o test/svc_datarate_test.cc.o test/svc_end_to_end_test.cc.o test/svc_test.cc.o 
test/test_libvpx.cc.o test/test_vector_test.cc.o test/test_vectors.cc.o test/timestamp_test.cc.o test/user_priv_test.cc.o test/vp8_datarate_test.cc
.o test/vp9_datarate_test.cc.o test/vp9_end_to_end_test.cc.o test/vp9_ethread_test.cc.o test/vp9_ext_ratectrl_test.cc.o test/vp9_lossless_test.cc.o
 test/vp9_motion_vector_test.cc.o test/vp9_skip_loopfilter_test.cc.o test/y4m_test.cc.o third_party/libwebm/mkvparser/mkvparser.cc.o third_party/li
bwebm/mkvparser/mkvreader.cc.o webmdec.cc.o y4menc.c.o y4minput.c.o -L. -lvpx -lgtest -lpthread -lm -lpthread
:info:build ld: warning: ignoring duplicate libraries: '-lpthread'
:info:build ld: warning: ignoring file '/opt/local/lib/libvpx.8.dylib': found architecture 'arm64', required architecture 'x86_64'
:info:build ld: Undefined symbols:
...

This looks similar to #31, and I also have ffmpeg installed.

Gcenx commented 3 months ago

This overlay doesn’t override libvpx so that’s a macports-ports problem.

Gcenx commented 3 months ago

This should be resolved with https://github.com/Gcenx/macports-wine/commit/ae13ac8b80881536ca139b6a8fc50d76332da209

ehrmann commented 3 months ago

That worked, but now I'm getting

# /opt/local/bin/port install wine-stable
--->  Computing dependencies for wine-stable
Error: Cannot install wine-stable for the arch 'x86_64' because
Error: its dependency MoltenVK-latest does not build for the required arch by default
Error: and does not have a universal variant.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port wine-stable failed

Looks like it doesn't build for x86_64 on Sonoma, right now.

https://ports.macports.org/port/MoltenVK-latest/details/

Gcenx commented 3 months ago

Ignore port details as MoltenVK-latest is marked as darwin any meaning it simply needs one buildbot to create an archive then all systems can use that.

I’ll need to check over the Portfile again as I had added a working universal variant before person rewrote the Portfile so it’s possible it had broken since then, I might just add a custom version back to the overlay again and always install for +universal

Gcenx commented 3 months ago

Ok that's weird, I just tested locally and I can pass +universal and it works on my system, and I have my MacPorts install default to x86_64.

Gcenx commented 3 months ago

Download the latest version of macports pkg installer and install it again, this won’t overwrite anything important be should restore your ability to to install for +universal.

MacPorts disables +universal if it assumes you the system doesn’t support it, I remember loosing +universal last time MacPorts updated to a new version during selfupdate.

Gcenx commented 2 months ago

@ehrmann the wine ports in this overlay no longer use macports gstreamer1 ports so even if macports-ports libvpx isn’t able to build for +universal this won’t affect these ports anymore.

Gcenx commented 2 months ago

I’m going to assume your issues are reaolved.