Installing Tenacity From Source

Context: I finally got my L5 (my order got lost, then delayed due to SIMple service, etc., but I’m happy with it now).

Has anyone succeeded in installing new software from source? More specifically, I want to be able to record my own voice, and the intuitive way to do that would be to install tenacity (the modern version of audacity, with no telemetry).

I know, I know, I should probably just choose a simpler app to record my voice; you can suggest some below. But in the meantime, I want to post my CMake error messages to see if anyone can help.

The CMake Error log contains the following:

/usr/bin/c++   -DHAVE_MMX   -mmmx -std=gnu++17 -o CMakeFiles/cmTC_7f507.dir/src.cxx.o -c "/media/purism/256 SDcard/git/tenacity/build/CMakeFiles/CMakeTmp/src.cxx"
c++: error: unrecognized command-line option '-mmmx'
/usr/bin/c++   -DHAVE_SSE   -msse -std=gnu++17 -o CMakeFiles/cmTC_0e5d6.dir/src.cxx.o -c "/media/purism/256 SDcard/git/tenacity/build/CMakeFiles/CMakeTmp/src.cxx"
c++: error: unrecognized command-line option '-msse'
/usr/bin/c++   -DHAVE_SSE2   -msse2 -std=gnu++17 -o CMakeFiles/cmTC_582c5.dir/src.cxx.o -c "/media/purism/256 SDcard/git/tenacity/build/CMakeFiles/CMakeTmp/src.cxx"
c++: error: unrecognized command-line option '-msse2'

Clearly, it is applying these g++ flags (mmmx, msse, msse2) to my compiler, when it presumably shouldn’t be. Oddly, I cannot seem to install gcc-doc, so I can’t even see the manpage for the compiler I’m using. All I know is, it’s 10.2.1 and it uses target aarch64-linux-gnu like it should.

The CMakeLists contains:

   check_cxx_compiler_flag( "-mmmx" HAVE_MMX )
      set( MMX_FLAG "-mmmx" CACHE INTERNAL "" )

   check_cxx_compiler_flag( "-msse" HAVE_SSE )
      set( SSE_FLAG "-msse" CACHE INTERNAL "" )

   check_cxx_compiler_flag( "-msse2" HAVE_SSE2 )
      set( SSE_FLAG "-msse2" CACHE INTERNAL "" )
   set( HAVE_MMX ON )
   set( HAVE_SSE ON )
   set( HAVE_SSE2 ON )
   if( NOT IS_64BIT )
      set( SSE_FLAG "/arch:SSE2" )

Even more weirdly, it proceeds to try to link the object files despite the above failures(???). Later in the CMakeError log, I see:

/usr/bin/cc  -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_d5639.dir/src.c.o -o cmTC_d5639  -lm -latomic -ldl 
/usr/bin/ld: CMakeFiles/cmTC_d5639.dir/src.c.o: in function `main':
src.c:(.text+0x34): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x3c): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x44): undefined reference to `pthread_cancel'
/usr/bin/ld: src.c:(.text+0x50): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status

I’m running out of ideas for how to resolve this. Even when I add debugging lines to the CMakeLists, I don’t see anything unusual: the pointer size is 8 bytes, and it says “Performing Test HAVE_MMX - Failed!”

Can anybody help?

The error does look similar to this one, about installing tor:

I’ve compiled quite a number if software on Linux phones (mostly on my PinePhone when it ran Arch Linux, it’s easier there with the AUR and not having to install tons of dev-packages) for

Before you go through all the hassle of building Tenacity, IIRC Debian (and thus PureOS) patch out the telemetry features of Audacity like sane Linux distributions do.

Having run Audacity 2.4.2 briefly on my Librem 5, let me tell you that it was not a great experience: It’s not mobile friendly, it’s not Wayland ready and thus is blurry thanks to Xwayland. It may be usable after connecting an external display and input devices, but otherwise it’s just going to be painful. I’d suggest a different app.

If you insist on using Tenacity: Tenacity is hardly packaged in distributions, it used to to be packaged in Alpine , so you could try it by updating your Librem 5’s u-boot and booting old postmarketOS 22.06 from microSD card or read that APKBUILD to find some helpful options for cmake).

I’ve had no issues compiling on the Librem 5, but have not yet built any projects with CMake on it (only meson, cargo and standard make). But should be much different from any other ARM platform really.

There definitely seems to be something buggy with the build scripts for tenacity. Both because it for some reason thinks it has MMX, SSE and SSE2 support which I believe is for x86 only. Do you know if tenacity for ARM is supported?

Personally for recording with the microphone, I’ve just used Gnome Sound Recorder which is in the repos so had no need to build anything from source.

Ffmpeg could record your voice

I use the arecord command to record my voice.

I know, I know, you didn’t want a bunch of people telling you other packages / commands to use. :wink: