尝试从源代码在Ubuntu 20.04上构建Audacity v2.4.2 。
按照http://wiki.audacityteam.org/wiki/Building_On_Linux的说明
到目前为止我所做的:
- 安装所有依赖项
- 使用 gtk2 克隆和构建 wxwidgets 3.1.3
- 使用示例测试 wxwidget - 最小和小部件(都很好)
$ /opt/newbie_2021/wxWidgets/buildgtk/samples/widgets/widgets
- wx 配置输出:
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
- 克隆的大胆
问题:
当我跑步时——
cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_ffmpeg=loaded ..
我得到这个输出:
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".
更多信息:
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
更新 1:感谢#audacity 上的@Naglfar 帮助我解决这个问题。
我可以看到的第一个问题是“在 Linux 上构建”文档缺少make
wxwidgets 构建命令。
其次,我必须明确指定目标位置:
../configure --with-cxx=14 --with-gtk=2 **--prefix=/usr/local**
我仍然遇到同样的错误,cmake
但至少有一些进展。
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
更新 2:
终于解决了。我不得不删除 cmake 缓存文件。
CMakeCache.txt
之后cmake
运行良好,make
和make install
.