Opened 3 years ago

Closed 3 years ago

#66607 closed defect (fixed)

ffmpeg @4.4.2_3: will not build universal on M1 Mac / Ventura: GNU assembler not found, install/update gas-preprocessor

Reported by: kencu (Ken) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: arm64 universal Cc: dbevans (David B. Evans), jeremyhu (Jeremy Huddleston Sequoia)
Port: ffmpeg

Description

--->  Configuring ffmpeg
--->  Configuring ffmpeg for architecture arm64
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_ffmpeg/ffmpeg/work/ffmpeg-4.4.2-arm64" && ./configure --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-libzimg --enable-libzvbi --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-zlib --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-indev=jack --enable-opencl --disable-outdev=xv --enable-audiotoolbox --enable-videotoolbox --enable-sdl2 --disable-securetransport --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-libaom --enable-librav1e --enable-libsvtav1 --enable-gpl --enable-postproc --enable-libx264 --enable-libx265 --enable-libxvid --enable-libvidstab --arch=arm64 
GNU assembler not found, install/update gas-preprocessor

Attachments (2)

ffmpeg-universal-arm-intel.log (19.5 KB) - added by kencu (Ken) 3 years ago.
config.log (312.8 KB) - added by kencu (Ken) 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 3 years ago by kencu (Ken)

Cc: dbevans jeremyhu added

Changed 3 years ago by kencu (Ken)

Changed 3 years ago by kencu (Ken)

Attachment: config.log added

comment:2 Changed 3 years ago by kencu (Ken)

some kind of an issue with the way arch is being set, it appears:

/usr/bin/clang -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I$(SRC_PATH)/compat/dispatch_semaphore -DPIC '-arch -fPIC -c -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_ffmpeg/ffmpeg/work/.tmp/ffconf.UwrV5WJb/test.o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_ffmpeg/ffmpeg/work/.tmp/ffconf.UwrV5WJb/test.S
clang: error: no such file or directory: ''-arch'; did you mean '-arch'?

comment:3 Changed 3 years ago by kencu (Ken)

It likes this version better:

% diff -u Portfile `port file ffmpeg`
--- Portfile	2022-12-29 23:19:54
+++ /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/multimedia/ffmpeg/Portfile	2023-01-02 14:10:04
@@ -304,7 +304,7 @@
     foreach arch ${configure.universal_archs} {
         set merger_host($arch) ""
         lappend merger_configure_args($arch) --arch=${arch}
-        lappend merger_configure_env($arch)  ASFLAGS='-arch ${arch}'
+        lappend merger_configure_env($arch)  "ASFLAGS=-arch ${arch}"
     }
     if {[string match "*86*" ${configure.universal_archs}]} {
         depends_build-append port:nasm

comment:4 Changed 3 years ago by kencu (Ken)

Yup, that did it:

% port -v installed ffmpeg
The following ports are currently installed:
  ffmpeg @4.4.2_3+gpl2+universal (active) requested_variants='+universal' platform='darwin 22' archs='arm64 x86_64' date='2023-01-02T14:13:41-0800'

comment:5 Changed 3 years ago by MichaelGDev48 (Michael G)

a bit related but , How did you get past all the dependencies I been trying to get a universal variant of ffmpeg but i keep running into issues when configuring dependencies related to ffmpeg hence all my reports of bugs with building universal packages Much appreciation to you though,youbeen great at fixing these packages

Last edited 3 years ago by MichaelGDev48 (Michael G) (previous) (diff)

comment:6 Changed 3 years ago by kencu (Ken)

Hey, you're welcome -- TBH I have just been doing this for a very very long time now...

I think I have most/all of the deps done, but if there are any missing let me know and I'll see if I can push the fixes.

comment:7 Changed 3 years ago by MichaelGDev48 (Michael G)

that seems to be all of them now just waiting on the patch you made to ffmpeg to be pushed :)

comment:8 Changed 3 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In 01ec793c58620cfa359558fd6af848e4176ae0fe/macports-ports (master):

ffmpeg* - minor tweak to ASFLAGS

closes: #66607

Note: See TracTickets for help on using tickets.