0

Trying to build Audacity v2.4.2 on Ubuntu 20.04 from source.

Following instructions from http://wiki.audacityteam.org/wiki/Building_On_Linux

What I've done so far:

  • Installed all dependencies
  • Cloned and built wxwidgets 3.1.3 with gtk2
  • Tested wxwidget with samples - minimal and widgets (all good)
$ /opt/newbie_2021/wxWidgets/buildgtk/samples/widgets/widgets

wxwidget sample: widget UI

  • wx-config output:
newbie_2021@msig7-ubuntu:~$ wx-config --version
3.1.3
newbie_2021@msig7-ubuntu:~$ wx-config --list
Default config is gtk2-unicode-3.1

Default config will be used for output

  • Cloned audacity

Issue:

When I'm running -

cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_ffmpeg=loaded ..

I get this output:

newbie_2021@msig7-ubuntu:/opt/newbie_2021/audacity/build$ cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_ffmpeg=loaded --log-level=TRACE ..
-- The ASM_NASM compiler identification is unknown
-- Didn't find assembler
-- Build Info:
--   Host System: Linux-5.4.0-58-generic
--   Host System Name: Linux
--   Host System Processor: x86_64
--   Host System Version: 5.4.0-58-generic
--   Host System Architecture: 64-bit
-- 
--   Compiler: /usr/bin/c++
--   Compiler Version: 9.3.0
--   Compiler Standard: 14
--   Compiler Standard Required: ON
--   Compiler Extensions: 
-- 
--   Current Commit: f7c0ba837
-- 
-- ========== Configuring wxwidgets ==========
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(167): wxWidgets_FIND_COMPONENTS : adv;base;core;html;net;qa;xml
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(167): wxWidgets_SELECT_OPTIONS=--static=no;--unicode=no;--universal=no
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_CXX_FLAGS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_DEFINITIONS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_INCLUDE_DIRS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_CXX_FLAGS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets required components : adv;base;core;html;net;qa;xml
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets optional components : 
wxWidgets_LIBRARIES=
wxWidgets_LIBRARY_DIRS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_LIBRARIES=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_LIBRARY_DIRS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_CXX_FLAGS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_DEFINITIONS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_INCLUDE_DIRS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_CXX_FLAGS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets required components : adv;base;core;html;net;qa;xml
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets optional components : 
wxWidgets_LIBRARIES=
wxWidgets_LIBRARY_DIRS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_LIBRARIES=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(171): wxWidgets_LIBRARY_DIRS=
-- /opt/newbie_2021/audacity/cmake-proxies/cmake-modules/FindwxWidgets.cmake(167): _wx_filename:  _wx_filename-NOTFOUND
CMake Error at cmake-proxies/cmake-modules/FindwxWidgets.cmake:1046 (message):
  wxWidgets wx/version.h file not found in .
Call Stack (most recent call first):
  cmake-proxies/wxWidgets/CMakeLists.txt:25 (find_package)

-- Configuring incomplete, errors occurred! See also "/opt/newbie_2021/audacity/build/CMakeFiles/CMakeOutput.log". See also "/opt/newbie_2021/audacity/build/CMakeFiles/CMakeError.log".

More info:

newbie_2021@msig7-ubuntu:~$ wx-config --cxxflags
-I/usr/local/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
newbie_2021@msig7-ubuntu:~$ wx-config --libs
-L/usr/local/lib -pthread   -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1
newbie_2021@msig7-ubuntu:~$ which wx-config
/usr/local/bin/wx-config
newbie_2021@msig7-ubuntu:~$ ll /usr/local/bin/wx-config
lrwxrwxrwx 1 root root 41 Dec 31 16:00 /usr/local/bin/wx-config -> /usr/local/lib/wx/config/gtk2-unicode-3.1
newbie_2021@msig7-ubuntu:~$ /opt/newbie_2021/wxWidgets/buildgtk/wx-config --version
3.1.3
newbie_2021@msig7-ubuntu:~$ ll /opt/newbie_2021/wxWidgets/buildgtk/wx-config 
lrwxrwxrwx 1 newbie_2021 wireshark 38 Dec 31 15:56 /opt/newbie_2021/wxWidgets/buildgtk/wx-config -> lib/wx/config/inplace-gtk2-unicode-3.1

Update 1: Thanks to @Naglfar on #audacity who is helping me with this.

The first issue I can see is that "Build on Linux" document is missing make command for wxwidgets build.

Secondly, I had to explicitly specify the target location: ../configure --with-cxx=14 --with-gtk=2 **--prefix=/usr/local**

I'm still getting the same error for cmake in audacity but at least there is some progress.

newbie_2021@msig7-ubuntu:~$ wx-config --cxxflags
-I/usr/local/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread

newbie_2021@msig7-ubuntu:~$ wx-config --selected-config gtk2-unicode-3.1

newbie_2021@msig7-ubuntu:~$ wx-config --libs -L/usr/local/lib -pthread -lwx_gtk2u_xrc-3.1 -lwx_gtk2u_html-3.1 -lwx_gtk2u_qa-3.1 -lwx_gtk2u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1

newbie_2021@msig7-ubuntu:~$ find /usr/local/ -name version.h /usr/local/lib/wx/version.h /usr/local/include/wx-3.1/wx/version.h

Update 2:

Finally got it resolved. I had to delete the cmake cache file. CMakeCache.txt

After that cmake ran fine, as did make and make install.

  • something is wrong here. Can you run wx-config --cxxflags and wx-config --libs? It is also preferable to post the output in the question as pastebin links become outdated. –  Jan 02 '21 at 01:30
  • @Igor Just added that info in the question above. – user1687589 Jan 02 '21 at 13:04

1 Answers1

0

For wxwidgets run configure with --prefix=/usr/local.

Run make before running make install.

Then ldconfig.

Delete CMakeCache.txt and then run cmake in audacity/build.