Opened 15 months ago

Last modified 15 months ago

#66801 assigned defect

audacity @3.0.2.129: xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"

Reported by: kwolcott Owned by: RJVB (René Bertin)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: arm64 Cc:
Port: audacity

Description (last modified by jmroot (Joshua Root))

Failure to install audacity from source (sudo port -v -s install audacity) on MacOS Ventura 13.1 with M1 chip.

Excerpt from the very bottom of the log file:

:info:build ninja: build stopped: cannot make progress due to previous errors.
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_audacity/audacity/work/build" && ninja -j8 -k 0 all -j8 -v
:info:build Exit code: 1
:error:build Failed to build audacity: command execution failed
:debug:build Error code: CHILDSTATUS 40817 1
: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"

Attachments (1)

audacity_main.log.bz2 (195.1 KB) - added by kwolcott 15 months ago.
compressed log file

Download all attachments as: .zip

Change History (9)

Changed 15 months ago by kwolcott

Attachment: audacity_main.log.bz2 added

compressed log file

comment:1 Changed 15 months ago by RJVB (René Bertin)

To be honest I am not very surprised that the build of this outdated port fails on an OS that is so much newer than any Mac OS I can run (10.13).

I thought I did a PR months ago that changed the port to pull an official Audacity DMG and install it from there, but can't seem to find it. I'll have to cross my fingers that I still have a copy of those changes locally, on my Mac!

comment:2 Changed 15 months ago by jmroot (Joshua Root)

Cc: rjvbertin@… removed
Description: modified (diff)
Keywords: ventura removed
Owner: set to RJVB
Status: newassigned
Summary: audacity install from source fails on Ventura 13.1 (M1 chip)audacity install from source fails on Apple Silicon

Fails on arm64 regardless of OS version; builds OK on Ventura x86_64.

comment:3 in reply to:  description Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Summary: audacity install from source fails on Apple Siliconaudacity @3.0.2.129: xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"

Replying to kwolcott:

Excerpt from the very bottom of the log file:

:info:build ninja: build stopped: cannot make progress due to previous errors.

As you can see, the very bottom of the log file isn't helpful; the real error is earlier in the log, so thank you for attaching it:

:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_audacity/audacity/work/audacity-3.0.2.129/lib-src/libsbsms/src/buffer.cpp:4:
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_audacity/audacity/work/audacity-3.0.2.129/lib-src/libsbsms/src/buffer.h:6:
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_audacity/audacity/work/audacity-3.0.2.129/lib-src/libsbsms/src/grain.h:5:
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_audacity/audacity/work/audacity-3.0.2.129/lib-src/libsbsms/src/fft.h:10:
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_audacity/audacity/work/audacity-3.0.2.129/lib-src/libsbsms/src/sse.h:9:
:info:build /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
:info:build #error "This header is only meant to be used on x86 and x64 architecture"
:info:build  ^

comment:4 Changed 15 months ago by kencu (Ken)

This port is currently broken by the base update to 2.8.1, so to get it to start building, I did this to unset the setting of worksrcdir:

-    worksrcdir      audacity-${version}
+
+# setting this breaks the build with the new base 2.8.1 extract changes
+#    worksrcdir      audacity-${version}

then you get the SSE errors. The part of the build that is using this is really ancient, so to prevent the build from using SSE on an ARM system, the easiest way was to just turn off SSE completely. This is probably just fine, as the port disables the universal variant anyway. To do that, you do this in the Portfile, for example:

@@ -298,7 +301,8 @@ if {${os.arch} ne "arm"} {
 } else {
     configure.args-append \
                     -D${_OPT}use_mad=off \
-                    -D${_OPT}use_id3tag=off
+                    -D${_OPT}use_id3tag=off \
+                    -DHAVE_SSE=no
 }
 if {${subport} eq ${name}} {
     # using port:sqlite3 leads to unstable behaviour?!

and then it builds through as an arm build. But that is not all, there is some kind of an error with the librariies when you check the links after:

--->  Cleaning audacity
--->  Removing work directory for audacity
--->  Updating database of binaries
--->  Scanning binaries for linking errors
Could not open /opt/local/var/macports/build/_opt_macportsofficial_macports-ports_audio_audacity/audacity/work/build/lib/libwx_baseu-3.1.dylib: Error opening or reading file (referenced from /Applications/MacPorts/Audacity.app/Contents/modules/mod-script-pipe.so)
Could not open /opt/local/var/macports/build/_opt_macportsofficial_macports-ports_audio_audacity/audacity/work/build/lib/libwx_baseu_xml-3.1.dylib: Error opening or reading file (referenced from /Applications/MacPorts/Audacity.app/Contents/modules/mod-script-pipe.so)
Could not open /opt/local/var/macports/build/_opt_macportsofficial_macports-ports_audio_audacity/audacity/work/build/lib/libwx_osx_cocoau_core-3.1.dylib: Error opening or reading file (referenced from /Applications/MacPorts/Audacity.app/Contents/modules/mod-script-pipe.so)
Could not open /opt/local/var/macports/build/_opt_macportsofficial_macports-ports_audio_audacity/audacity/work/build/lib/libwx_osx_cocoau_qa-3.1.dylib: Error opening or reading file (referenced from /Applications/MacPorts/Audacity.app/Contents/modules/mod-script-pipe.so)
Could not open /opt/local/var/macports/build/_opt_macportsofficial_macports-ports_audio_audacity/audacity/work/build/lib/libwx_baseu_net-3.1.dylib: Error opening or reading file (referenced from /Applications/MacPorts/Audacity.app/Contents/modules/mod-script-pipe.so)
Could not open /opt/local/var/macports/build/_opt_macportsofficial_macports-ports_audio_audacity/audacity/work/build/lib/libwx_osx_cocoau_html-3.1.dylib: Error opening or reading file (referenced from /Applications/MacPorts/Audacity.app/Contents/modules/mod-script-pipe.so)
Could not open /opt/local/var/macports/build/_opt_macportsofficial_macports-ports_audio_audacity/audacity/work/build/lib/libwx_osx_cocoau_adv-3.1.dylib: Error opening or reading file (referenced from /Applications/MacPorts/Audacity.app/Contents/modules/mod-script-pipe.so)
--->  Found 7 broken files, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: audacity @3.0.2.129

Looks like something is not being moved around as it should. This Portfile has a lot of complicated jockeying around of stuff, so some digging into that might fix this I guess. I did try to use the "+wxsystem" variant to see if I could just use the system's libraries, but that variant is just broken:

 % sudo port -v install +wxsystem
Error: invalid parameter for wxWidgets.use; use one of:
	wxWidgets-2.8/wxGTK-2.8/wxWidgets-3.0/wxGTK-3.0/wxPython-3.0/wxWidgets-3.2
Error: Unable to open port: can't set "depends_lib": invalid depspec: port:

So I finally figured out that to make that start, you had to do this:

% sudo port -v install +wxsystem +wx32

but that failed quickly anyway:

-- Found Python3: /opt/local/bin/python3.11 (found version "3.11.1") found components: Interpreter 
-- ========== Configuring wxwidgets ==========
wxWidgets_LIBRARIES=general;-L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/lib;general;-framework IOKit;general;-framework Carbon;general;-framework Cocoa;general;-framework QuartzCore;general;-framework AudioToolbox;general;-framework System;general;-framework OpenGL;general;-lwx_baseu-3.1;general;-lwx_osx_cocoau_core-3.1;general;-lwx_osx_cocoau_html-3.1;general;-lwx_baseu_net-3.1;general;-lwx_osx_cocoau_qa-3.1;general;-lwx_baseu_xml-3.1
wxWidgets_LIBRARY_DIRS=/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.1/lib
CMake Error at /opt/local/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES)
Call Stack (most recent call first):
  /opt/local/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake-proxies/cmake-modules/FindwxWidgets.cmake:1072 (find_package_handle_standard_args)
  cmake-proxies/wxWidgets/CMakeLists.txt:22 (find_package)


-- Configuring incomplete, errors occurred!

So still work to be done...

comment:5 Changed 15 months ago by kencu (Ken)

forget that, I just downloaded the latest universal version from here:

https://www.audacityteam.org/download/mac/

it was updated last week

comment:6 in reply to:  5 ; Changed 15 months ago by RJVB (René Bertin)

Replying to kencu:

forget that

Well, I would like to know what in "base" makes changing the worksrcdir fail. Wouldn't that rather be a change in the github PG? Because I see my local copy also has that line commented out, a change that apparently never made it here.

But yeah, I *think* it was my intention to make the port grab an upstream DMG, if not only because there have been performance improvements and reductions of resource usage. It's always been a tricky port to build what with the requirements on wxWidgets. However I'd not pick Audacity itself but rather one of the forks without controversial telemetry and TOS/AUP changes built in. I think Tenacity has become the main "clean" fork.

I even looked into building the port from Tenacity source but this would require creating ports for the various little bits that Audacity includes as "vendored" source.

comment:7 in reply to:  6 Changed 15 months ago by kencu (Ken)

Replying to RJVB:

Well, I would like to know what in "base" makes changing the worksrcdir fail.

I could try to paraphrase it, but the best thing to do would be to look at the last few months in base commits and see the things relating to 'extract' and 'extract.rename', and then you'll probably understand it better than I do...

comment:8 Changed 15 months ago by RJVB (René Bertin)

OK, will do. I do see that ports still change worksrcdir (e.g. port:xmlroff) so apparently it has not become off-limits or anything.

Note: See TracTickets for help on using tickets.