안녕하세요? 도정진입니다.
최근에 gcc 컴파일러와 clang 그리고 makefile / cmake / automake 등을 파헤쳐 보면서 mpd 를 스태틱으로 컴파일 하여 모든 곳에서 원 바이너리로 동작하게 하면 되지 않을까? 하는 방법으로 시도해 보고 있었지만 실패하였습니다.
일단 다이나믹 링크 바이너리 + 스태틱 링크 바이너리를 만드는 방법에 대해서 작성해 보겠습니다.
1. 최근 mpd 동향 및 컴파일 준비
최근에 mpd 동향이 meson 빌드 시스템과 ninja 컴파일 시스템으로 바뀌었습니다.
meson 빌드 시스템은 meson.build 파일을 작성하여 컴파일 환경을 만드는 것입니다. 이전에 mpd 는 automake (autotools) 를 사용했지만, 이번부터 meson 과 ninja 를 통해서 빌드를 합니다.
meson 은 Makefile 같은 것이라고 보시면 되며, ninja 는 gcc 같은 것으로 보면 됩니다. gcc 는 컴파일러가 아닌 일종의 프론트엔드입니다.
디파인과정, 어셈블리로바꾸는과정, 오브젝트로 바꾸는 과정, 링크과정 --> 바이너리 이렇게 컴파일 하는 것을 gcc 가 앞단에서 조작해 준다고 생각하시면 됩니다.
일단 의존성 패키지는 아래와 같이 중구 난방으로 설치하다보니 중간에 중복으로 작성된 패키지가 있을 것입니다.
그리고 컴파일 환경이 매우 버전이 높아.. unstable repo 를 추가해야합니다. 언스테이블 레포 추가하는 것 자체가 시스템을 더럽히는 일이라.. 아무래도 스태틱으로 빌드하려고 했는데 실패해서.. 일단 빌드 과정을 공유합니다.
root@AOL-Debian:~# nano /etc/apt/sources.list
# debian unstable
deb http://ftp.kr.debian.org/debian unstable main contrib non-free
deb-src http://ftp.kr.debian.org/debian unstable main contrib non-free
apt install libboost-dev libicu-dev libglib2.0-dev libid3tag0-dev libcurl4-openssl-dev libsmbclient-dev libnfs-dev libupnp-dev libaudiofile-dev libavformat-dev libavcodec-dev libavutil-dev libmad0-dev libshout-dev libmpg123-dev libwavpack-dev libmp3lame-dev libpulse-dev libmpdclient-dev libyajl-dev libasound-dev
apt install -t unstable gcc g++
apt install meson git
apt install libpcre3-dev libmad0-dev libmpg123-dev libid3tag0-dev libflac-dev libvorbis-dev libopus-dev libadplug-dev libaudiofile-dev libsndfile1-dev libfaad-dev libfluidsynth-dev libgme-dev libmikmod2-dev libmodplug-dev libmpcdec-dev libwavpack-dev libwildmidi-dev libsidplay2-dev libsidutils-dev libresid-builder-dev libavcodec-dev libavformat-dev libmp3lame-dev libtwolame-dev libshine-dev libsamplerate0-dev libsoxr-dev libbz2-dev libcdio-paranoia-dev libiso9660-dev libmms-dev libzzip-dev libcurl4-gnutls-dev libyajl-dev libexpat-dev libasound2-dev libao-dev libjack-jackd2-dev libopenal-dev libpulse-dev libshout3-dev libsndio-dev libmpdclient-dev libnfs-dev libsmbclient-dev libupnp-dev libavahi-client-dev libsqlite3-dev libsystemd-dev libgtest-dev libboost-dev libicu-dev
apt install libboost1.62-dev
apt install libgcrypt-dev
apt install libavfilter-dev libchromaprint-dev libiso9660-dev libsidplayfp-dev
apt install libbsd-dev
apt-get install pkg-config libgmp-dev libmpfr-dev libmpc-dev
추가로 설치한 패키지들이 많이 있으나, configure 과정에서 참고하여 설치하시길 바랍니다.
libboost-dev 는 1.62 버전으로, 그리고 링킹 과정에서 MD5 에러는 libgcrypt-dev 를 설치하셔야 합니다.
MD5 에러는 소스 트리를 보고 해당하는 헤더 파일이 없는걸 확인해서 설치했네요.. libssl 을 사용하지 않습니다.
2. sacd iso 지원 mpd 소스 클론 / meson cofigure 진행
git clone https://github.com/archphile/mpd-manisiutkin.git
아래처럼 configure 를 진행합니다. 스태틱 빌드를 하기 위해서 --default-library static 옵션을 추가로 줬습니다.
root@AOL-Debian:~/mpd-manisiutkin# meson . output/release --buildtype=debugoptimized -Db_ndebug=true --default-library static
The Meson build system
Version: 0.51.1
Source dir: /root/mpd-manisiutkin
Build dir: /root/mpd-manisiutkin/output/release
Build type: native build
Project name: mpd
Project version: 0.22~git
C compiler for the build machine: cc (gcc 8.3.0 "cc (Debian 8.3.0-19) 8.3.0")
C++ compiler for the build machine: c++ (gcc 8.3.0 "c++ (Debian 8.3.0-19) 8.3.0")
C compiler for the host machine: cc (gcc 8.3.0 "cc (Debian 8.3.0-19) 8.3.0")
C++ compiler for the host machine: c++ (gcc 8.3.0 "c++ (Debian 8.3.0-19) 8.3.0")
Build machine cpu family: arm
Build machine cpu: armv7l
Found git repository at /root/mpd-manisiutkin
Compiler for C++ supports arguments -Wall: YES
Compiler for C++ supports arguments -Wextra: YES
Compiler for C++ supports arguments -Wvla: YES
Compiler for C++ supports arguments -fvisibility=hidden: YES
Compiler for C++ supports arguments -ffast-math: YES
Compiler for C++ supports arguments -ftree-vectorize: YES
Compiler for C++ supports arguments -static: YES
Compiler for C++ supports arguments -fno-threadsafe-statics: YES
Compiler for C++ supports arguments -fmerge-all-constants: YES
Compiler for C++ supports arguments -Wmissing-declarations: YES
Compiler for C++ supports arguments -Wshadow: YES
Compiler for C++ supports arguments -Wpointer-arith: YES
Compiler for C++ supports arguments -Wcast-qual: YES
Compiler for C++ supports arguments -Wwrite-strings: YES
Compiler for C++ supports arguments -Wsign-compare: YES
Compiler for C++ supports arguments -Wno-non-virtual-dtor -Wnon-virtual-dtor: YES
Compiler for C++ supports arguments -Wno-noexcept-type -Wnoexcept-type: YES
Compiler for C supports arguments -Wall: YES
Compiler for C supports arguments -Wextra: YES
Compiler for C supports arguments -Wvla: YES
Compiler for C supports arguments -fvisibility=hidden: YES
Compiler for C supports arguments -ffast-math: YES
Compiler for C supports arguments -ftree-vectorize: YES
Compiler for C supports arguments -static: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -pedantic: YES
Compiler for C supports arguments -static: YES (cached)
Compiler for C supports arguments -ffunction-sections: YES
Compiler for C supports arguments -fdata-sections: YES
Compiler for C++ supports link arguments -Wl,--gc-sections: YES
Has header "locale.h" : YES
Checking for function "getpwnam_r" : YES
Checking for function "getpwuid_r" : YES
Checking for function "initgroups" : YES
Checking for function "fnmatch" : YES
Checking for function "strndup" : YES
Checking for function "strcasestr" : YES
Checking for function "syslog" : YES
Run-time dependency Boost found: YES 1.62
Run-time dependency threads found: YES
Checking for function "pthread_setname_np" with dependency threads: YES
Found pkg-config: /usr/bin/pkg-config (0.29)
Run-time dependency dbus-1 found: YES 1.12.16
Run-time dependency icu-i18n found: YES 63.2
Run-time dependency smbclient found: YES 0.4.0
Run-time dependency zlib found: YES 1.2.11
Run-time dependency alsa found: YES 1.1.8
Run-time dependency libchromaprint found: YES 1.4.3
Run-time dependency libcurl found: YES 7.65.1
Run-time dependency expat found: YES 2.2.7
Run-time dependency libavformat found: YES 58.20.100
Run-time dependency libavcodec found: YES 58.35.100
Run-time dependency libavutil found: YES 56.22.100
Run-time dependency libavfilter found: YES 7.40.101
Library gcrypt found: YES
libgcrypt-config found: YES (/usr/bin/libgcrypt-config) 1.8.4
Run-time dependency libgcrypt found: YES 1.8.4
Run-time dependency libnfs found: YES 3.0.0
Run-time dependency libpcre found: YES 8.39
Run-time dependency libpulse found: YES 12.2
Library sndio found: YES
Header <sndio.h> has symbol "ROAR_VERSION" : NO
Run-time dependency sqlite3 found: YES 3.29.0
Run-time dependency libsystemd found: YES 241
Run-time dependency libupnp found: YES 1.8.4
Run-time dependency yajl found: YES 2.1.0
Header <sys/socket.h> has symbol "AF_INET6" : YES
Header <sys/socket.h> has symbol "struct ucred" : YES
Header <sys/socket.h> has symbol "SO_PEERCRED" : YES
Checking for function "getpeereid" : NO
Run-time dependency id3tag found: YES 0.15.0b
Run-time dependency samplerate found: YES 0.1.9
Run-time dependency soxr found: YES 0.1.2
Run-time dependency libcdio_paranoia found: YES 10.2+0.94+2
Run-time dependency libmms found: YES 0.6.4
Run-time dependency libiso9660 found: YES 2.0.0
Library bz2 found: YES
Run-time dependency zziplib found: YES 0.13.62
Run-time dependency ao found: YES 1.2.2
Run-time dependency jack found: YES 1.9.12
Header <jack/jack.h> has symbol "jack_set_info_function" : YES
Run-time dependency openal found: YES 1.19.1
Run-time dependency shout found: YES 2.4.1
Run-time dependency flac found: YES 1.3.2
Run-time dependency opus found: YES 1.3
Run-time dependency vorbis found: YES 1.3.6
Run-time dependency vorbisenc found: YES 1.3.6
Run-time dependency ogg found: YES 1.3.2
Run-time dependency adplug found: YES 2.2.1
Run-time dependency fluidsynth found: YES 1.1.11
Run-time dependency audiofile found: YES 0.3.6
Library faad found: YES
Library gme found: YES
Library mad found: YES
Run-time dependency libmikmod found: YES 3.3.11
Run-time dependency libmodplug found: YES 0.8.9.0
Library mpcdec found: YES
Run-time dependency libmpg123 found: YES 1.25.10
Run-time dependency sndfile found: YES 1.0.28
Run-time dependency wavpack found: YES 5.1.0
Library WildMidi found: YES
Run-time dependency libsidplayfp found: YES 1.8.8
Library mp3lame found: YES
Run-time dependency twolame found: YES 0.3.13
Run-time dependency shine found: YES 3.1.0
Run-time dependency avahi-client found: YES 0.7
Run-time dependency libmpdclient found: YES 2.16
Configuring config.h using configuration
Configuring mpd.service using configuration
Configuring mpd.service using configuration
Build targets in project: 67
Found ninja-1.9.0 at /usr/bin/ninja
결과를 확인합니다.
root@AOL-Debian:~/mpd-manisiutkin# meson configure output/release
Core properties:
Source dir /root/mpd-manisiutkin
Build dir /root/mpd-manisiutkin/output/release
Core options:
Option Current Value Possible Values Description
------ ------------- --------------- -----------
auto_features auto [enabled, disabled, auto] Override value of all 'auto' features
backend ninja [ninja, vs, vs2010, vs2015, vs2017, vs2019, xcode] Backend to use
buildtype debugoptimized [plain, debug, debugoptimized, release, minsize, custom] Build type to use
debug true [true, false] Debug
default_library static [shared, static, both] Default library type
install_umask 0022 [preserve, 0000-0777] Default umask to apply on permissions of installed files
layout mirror [mirror, flat] Build directory layout
optimization 2 [0, g, 1, 2, 3, s] Optimization level
strip false [true, false] Strip targets on install
unity off [on, off, subprojects] Unity build
warning_level 1 [0, 1, 2, 3] Compiler warning level to use
werror false [true, false] Treat warnings as errors
wrap_mode default [default, nofallback, nodownload, forcefallback] Wrap mode
Core options (for host machine):
Option Current Value Description
------ ------------- -----------
cmake_prefix_path [] List of additional prefixes for cmake to search
pkg_config_path [] List of additional paths for pkg-config to search
Core options (for build machine):
Option Current Value Description
------ ------------- -----------
build.cmake_prefix_path [] List of additional prefixes for cmake to search
build.pkg_config_path [] List of additional paths for pkg-config to search
Backend options:
Option Current Value Possible Values Description
------ ------------- --------------- -----------
backend_max_links 0 >=0 Maximum number of linker processes to run or 0 for no limit
Base options:
Option Current Value Possible Values Description
------ ------------- --------------- -----------
b_asneeded true [true, false] Use -Wl,--as-needed when linking
b_colorout always [auto, always, never] Use colored output
b_coverage false [true, false] Enable coverage tracking.
b_lto false [true, false] Use link time optimization
b_lundef true [true, false] Use -Wl,--no-undefined when linking
b_ndebug true [true, false, if-release] Disable asserts
b_pch true [true, false] Use precompiled headers
b_pgo off [off, generate, use] Use profile guided optimization
b_pie false [true, false] Build executables as position independent
b_sanitize none [none, address, thread, undefined, memory, address,undefined] Code sanitizer to use
b_staticpic true [true, false] Build static libraries as position independent
Compiler options (for host machine):
Option Current Value Possible Values Description
------ ------------- --------------- -----------
c_args [] Extra arguments passed to the C compiler
c_link_args [] Extra arguments passed to the C linker
c_std c99 [none, c89, c99, c11, c17, c18, gnu89, gnu99, gnu11, gnu17, C language standard to use
gnu18]
cpp_args [] Extra arguments passed to the C++ compiler
cpp_debugstl false [true, false] STL debug mode
cpp_eh default [none, default, a, s, sc] C++ exception handling type.
cpp_link_args [] Extra arguments passed to the C++ linker
cpp_std c++14 [none, c++98, c++03, c++11, c++14, c++17, c++1z, c++2a, C++ language standard to use
gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z, gnu++2a]
Compiler options (for build machine):
Option Current Value Possible Values Description
------ ------------- --------------- -----------
build.c_args [] Extra arguments passed to the C compiler
build.c_link_args [] Extra arguments passed to the C linker
build.c_std none [none, c89, c99, c11, c17, c18, gnu89, gnu99, gnu11, gnu17, C language standard to use
gnu18]
build.cpp_args [] Extra arguments passed to the C++ compiler
build.cpp_debugstl false [true, false] STL debug mode
build.cpp_eh default [none, default, a, s, sc] C++ exception handling type.
build.cpp_link_args [] Extra arguments passed to the C++ linker
build.cpp_std none [none, c++98, c++03, c++11, c++14, c++17, c++1z, c++2a, C++ language standard to use
gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z, gnu++2a]
Directories:
Option Current Value Description
------ ------------- -----------
bindir bin Executable directory
datadir share Data file directory
includedir include Header file directory
infodir share/info Info page directory
libdir lib/arm-linux-gnueabihf Library directory
libexecdir libexec Library executable directory
localedir share/locale Locale data directory
localstatedir var Localstate data directory
mandir share/man Manual page directory
prefix /usr/local Installation prefix
sbindir sbin System executable directory
sharedstatedir com Architecture-independent data directory
sysconfdir etc Sysconf data directory
Project options:
Option Current Value Possible Values Description
------ ------------- --------------- -----------
adplug auto [enabled, disabled, auto] AdPlug decoder plugin
alsa auto [enabled, disabled, auto] ALSA support
android_abi armeabi-v7a The Android ABI to be built
android_debug_keystore The keystore file used to sign debug APK files
android_keyalias The key alias used to sign APK files
android_keypass The password of the keystore used to sign APK files
android_keystore The keystore file used to sign APK files
android_ndk The path where Android NDK is installed
android_sdk The path where Android SDK is installed
android_strip strip The "strip" tool from the NDK
ao auto [enabled, disabled, auto] libao output plugin
audiofile auto [enabled, disabled, auto] libaudiofile decoder plugin
bzip2 auto [enabled, disabled, auto] bzip2 support using libbz2
cdio_paranoia auto [enabled, disabled, auto] libcdio_paranoia input plugin
chromaprint auto [enabled, disabled, auto] ChromaPrint / AcoustID support
cue true [true, false] CUE sheet support
curl auto [enabled, disabled, auto] HTTP client using CURL
daemon true [true, false] enable daemonization
database true [true, false] enable support for the music database
dbus auto [enabled, disabled, auto] D-Bus support
documentation false [true, false] Build documentation
dsd true [true, false] Support the DSD audio format
dvdaiso true [true, false] Support DVD-Audio ISO via libdvdaiso
epoll true [true, false] Use epoll on Linux
eventfd true [true, false] Use eventfd() on Linux
expat auto [enabled, disabled, auto] Expat XML support
faad auto [enabled, disabled, auto] AAC decoder using libfaad
ffmpeg auto [enabled, disabled, auto] FFmpeg codec support
fifo true [true, false] FIFO output plugin
flac auto [enabled, disabled, auto] FLAC decoder plugin
fluidsynth auto [enabled, disabled, auto] fluidsynth MIDI decoder plugin
gme auto [enabled, disabled, auto] Game Music Emulator decoder plugin
httpd true [true, false] HTTP streaming output plugin
iconv auto [enabled, disabled, auto] Use iconv() for character set conversion
icu auto [enabled, disabled, auto] Use libicu for Unicode
id3tag auto [enabled, disabled, auto] ID3 support using libid3tag
inotify true [true, false] inotify support (for automatic database update)
ipv6 auto [enabled, disabled, auto] Support for IPv6
iso9660 auto [enabled, disabled, auto] ISO9660 support using libiso9660
jack auto [enabled, disabled, auto] JACK output plugin
lame auto [enabled, disabled, auto] LAME MP3 encoder plugin
libmpdclient auto [enabled, disabled, auto] libmpdclient support (for the proxy database plugin)
libsamplerate auto [enabled, disabled, auto] libsamplerate resampler
local_socket true [true, false] Support for clients connecting via local sockets
mad auto [enabled, disabled, auto] MP3 decoder using libmad
mikmod auto [enabled, disabled, auto] MikMod decoder plugin
mms auto [enabled, disabled, auto] MMS protocol support using libmms
modplug auto [enabled, disabled, auto] Modplug decoder plugin
mpcdec auto [enabled, disabled, auto] Musepack decoder plugin
mpg123 auto [enabled, disabled, auto] MP3 decoder using libmpg123
neighbor true [true, false] enable support for neighbor discovery
nfs auto [enabled, disabled, auto] NFS protocol support using libnfs
openal auto [enabled, disabled, auto] OpenAL output plugin
opus auto [enabled, disabled, auto] Opus decoder plugin
oss auto [enabled, disabled, auto] Open Sound System support
pcre auto [enabled, disabled, auto] Enable regular expression support (using libpcre)
pipe true [true, false] Pipe output plugin
pulse auto [enabled, disabled, auto] PulseAudio support
qobuz auto [enabled, disabled, auto] Qobuz client
recorder true [true, false] Recorder output plugin
sacdiso true [true, false] Support Super Audio CD ISO via libsacdiso
shine auto [enabled, disabled, auto] shine MP3 encoder plugin
shout auto [enabled, disabled, auto] Shoutcast streaming support using libshout
sidplay auto [enabled, disabled, auto] C64 SID support via libsidplayfp or libsidplay2
signalfd true [true, false] Use signalfd() on Linux
smbclient auto [enabled, disabled, auto] SMB support using libsmbclient
sndfile auto [enabled, disabled, auto] libsndfile decoder plugin
sndio auto [enabled, disabled, auto] sndio output plugin
solaris_output auto [enabled, disabled, auto] Solaris /dev/audio support
soundcloud auto [enabled, disabled, auto] SoundCloud client
soxr auto [enabled, disabled, auto] libsoxr resampler
sqlite auto [enabled, disabled, auto] SQLite database support (for stickers)
syslog auto [enabled, disabled, auto] syslog support
systemd auto [enabled, disabled, auto] systemd support
systemd_system_unit_dir systemd system service directory
systemd_user_unit_dir systemd user service directory
tcp true [true, false] Support for clients connecting via TCP
test false [true, false] Build the unit tests and debug programs
tidal auto [enabled, disabled, auto] Tidal client
tremor auto [enabled, disabled, auto] Fixed-point vorbis decoder plugin
twolame auto [enabled, disabled, auto] TwoLAME MP2 encoder plugin
udisks auto [enabled, disabled, auto] Support for removable media using udisks2
upnp auto [enabled, disabled, auto] UPnP client support
vorbis auto [enabled, disabled, auto] Vorbis decoder plugin
vorbisenc auto [enabled, disabled, auto] Vorbis encoder plugin
wave_encoder true [true, false] PCM wave encoder encoder plugin
wavpack auto [enabled, disabled, auto] WavPack decoder plugin
webdav auto [enabled, disabled, auto] WebDAV support using CURL and Expat
wildmidi auto [enabled, disabled, auto] WildMidi decoder plugin
yajl auto [enabled, disabled, auto] libyajl for YAML support
zeroconf auto [auto, avahi, bonjour, disabled] Zeroconf support
zlib auto [enabled, disabled, auto] zlib support (for database compression)
zzip auto [enabled, disabled, auto] ZIP support using zziplib
Testing options:
Option Current Value Possible Values Description
------ ------------- --------------- -----------
errorlogs true [true, false] Whether to print the logs from failing tests
stdsplit true [true, false] Split stdout and stderr in test logs
3. meson.build 옵션을 수정하여 static 옵션 추가 작성
root@AOL-Debian:~/mpd-manisiutkin# nano meson.build
common_cppflags = [
'-D_GNU_SOURCE','-static'
]
common_cflags = [
'-static',
]
common_cxxflags = [
'-static',
]
test_common_flags = [
'-Wall',
'-Wextra',
'-Wvla',
'-fvisibility=hidden',
'-ffast-math',
'-ftree-vectorize',
'-static'
]
상기처럼 -static 옵션을 넣어줍니다. 물론, 중복되어 들어가도 상관없습니다.
다만, ldflags 에 설정하면 다른 의존성이 shared object 이기 때문에 링킹 과정에서 에러가 발생합니다. 조금 뒤에 관련하여 설명 드리겠습니다.
meson.build 파일을 수정하고 나면 output/release 폴더를 지우고 2번 과정을 새로 하셔야합니다.
4. 빌드 진행
진짜 닌자와 다름없습니다. 컴파일이 매우 빠르네요. ㅎㅎㅎ
저도 차후에 오픈소스 개발하게 되면 닌자를 써야겠습니다 ㅎㅎ..
root@AOL-Debian:~/mpd-manisiutkin# ninja -C output/release/
ninja: Entering directory `output/release/'
[13/678] Generating GitVersion.cxx with a custom command.
fatal: No names found, cannot describe anything.
[28/678] Compiling C++ object 'src/system/33029a6@@system@sta/Open.cxx.o'.
이후 맨 마지막에 링킹 과정이 일어납니다. ldflags 에 static 옵션을 주면 shared object 와 링킹을 시도하려고 하기 때문에 실패하게 됩니다.
일단 여기서 드는 의문점은.. 아래의 라이브러리를 스태틱 빌드를 하고, meson wrapper 로 래핑을 해야하는데 방법을 못찾고 있습니다.
반은 스태틱, 반은 쉐어드.. 이렇게 해도 바이너리 사이즈가 44MB 입니다.
/usr/include/c++/8/bits/stl_vector.h:1348:71: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<DetachedSong*, std::vector<DetachedSong> >’ changed in GCC 7.1
return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg));
^
/usr/include/c++/8/bits/stl_vector.h:1348:71: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<DetachedSong*, std::vector<DetachedSong> >’ changed in GCC 7.1
return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg));
^
[678/678] Linking target mpd.
/usr/bin/ld: warning: libicui18n.so.57, needed by /usr/lib/arm-linux-gnueabihf//libxml2.so.2, may conflict with libicui18n.so.63
/usr/bin/ld: warning: libicuuc.so.57, needed by /usr/lib/arm-linux-gnueabihf//libxml2.so.2, may conflict with libicuuc.so.63
root@AOL-Debian:~/mpd-manisiutkin# cd output/release/
root@AOL-Debian:~/mpd-manisiutkin/output/release# ls -lih
total 44M
471930 drwxr-xr-x 2 root root 4.0K Jul 21 21:48 basic@sta
392953 -rw-r--r-- 1 root root 677K Jul 21 21:39 build.ninja
392954 -rw-r--r-- 1 root root 762K Jul 21 21:39 compile_commands.json
392908 -rw-r--r-- 1 root root 2.6K Jul 21 21:39 config.h
392957 -rw-r--r-- 1 root root 869 Jul 21 21:44 GitVersion.cxx
392960 -rw-r--r-- 1 root root 66K Jul 21 21:48 libbasic.a
471266 drwxr-xr-x 2 root root 4.0K Jul 21 21:39 meson-info
471265 drwxr-xr-x 2 root root 4.0K Jul 21 21:38 meson-logs
471264 drwxr-xr-x 2 root root 4.0K Jul 21 21:39 meson-private
392959 -rwxr-xr-x 1 root root 42M Jul 21 21:51 mpd
471936 drwxr-xr-x 2 root root 4.0K Jul 21 21:51 mpd@exe
471273 drwxr-xr-x 26 root root 4.0K Jul 21 21:39 src
471369 drwxr-xr-x 4 root root 4.0K Jul 21 21:39 systemd
5. 빌드된 바이너리 원래 mpd 와 바꿔치기
바이너리만 살짝 바꿔치기 해서 사용해 봅니다. 일단 실행은 잘 됩니다.
root@AOL-Debian:~# service mpd restart
[ ok ] Stopping Music Player Daemon: mpd.
[....] Starting Music Player Daemon: mpdconfig_file: config parameter "id3v1_encoding" on line 24 is deprecated
Jul 21 21:53 : exception: Failed to access /var/lib/mpd/playlists: No such file or directory
. ok
설정 파일을 수정해서 sacd iso 가 동작하도록 합니다.
root@AOL-Debian:~# nano /etc/mpd.conf
decoder {
plugin "sacdiso"
dstdec_threads "4"
edited_master "true"
lsbitfirst "false"
playable_area "stereo"
}
decoder {
plugin "dvdaiso
no_downmixes "false"
no_short_tracks "false"
playable_area "multichannel"
tags_path "/var/lib/mpd/dvda_metabase"
tags_with_iso "true"
}
root@AOL-Debian:~/mpd-manisiutkin/output/release# mkdir -p /var/lib/mpd/playlists
root@AOL-Debian:~/mpd-manisiutkin/output/release# service mpd restart
[ ok ] Stopping Music Player Daemon: mpd.
[....] Starting Music Player Daemon: mpdconfig_file: config parameter "id3v1_encoding" on line 24 is deprecated
. ok
6. 완전 스태틱 빌드를 하려면?
아래 shared object 를 스태틱으로 빌드하고 링크해야합니다. ㅠㅠ 음.. 이게 과연 맞는 것인지 애매모합니다.
/usr/lib/arm-linux-gnueabihf/libdbus-1.so
/usr/lib/arm-linux-gnueabihf/libavformat.so
/usr/lib/arm-linux-gnueabihf/libavcodec.so
/usr/lib/arm-linux-gnueabihf/libavfilter.so
/usr/lib/arm-linux-gnueabihf/libavutil.so
/usr/lib/arm-linux-gnueabihf/libpcre.so
/usr/lib/arm-linux-gnueabihf/libchromaprint.so
/usr/lib/arm-linux-gnueabihf/libz.so
/usr/lib/arm-linux-gnueabihf/libicui18n.so
/usr/lib/arm-linux-gnueabihf/libicuuc.so
/usr/lib/arm-linux-gnueabihf/libicudata.so
/usr/lib/arm-linux-gnueabihf/libsmbclient.so
/usr/lib/arm-linux-gnueabihf/libupnp.so
/usr/lib/arm-linux-gnueabihf/libixml.so
/usr/lib/arm-linux-gnueabihf/libcurl.so
/usr/lib/arm-linux-gnueabihf/libexpat.so
/usr/lib/arm-linux-gnueabihf/libcdio_paranoia.so
/usr/lib/arm-linux-gnueabihf/libcdio_cdda.so
/usr/lib/arm-linux-gnueabihf/libcdio.so
/usr/lib/arm-linux-gnueabihf/libmms.so
/usr/lib/arm-linux-gnueabihf/libglib-2.0.so
/usr/lib/arm-linux-gnueabihf/libnfs.so
/usr/lib/arm-linux-gnueabihf/libyajl.so
/usr/lib/arm-linux-gnueabihf/libasound.so
/usr/lib/arm-linux-gnueabihf/libsamplerate.so
/usr/lib/arm-linux-gnueabihf/libsoxr.so
/usr/lib/arm-linux-gnueabihf/libid3tag.so
/usr/lib/arm-linux-gnueabihf/libiso9660.so
/usr/lib/arm-linux-gnueabihf/libzzip.so
/usr/lib/arm-linux-gnueabihf/libpulse.so
/usr/lib/arm-linux-gnueabihf/libao.so
/usr/lib/arm-linux-gnueabihf/libjack.so
/usr/lib/arm-linux-gnueabihf/libshout.so
/usr/lib/arm-linux-gnueabihf/libopenal.so
/usr/lib/libadplug.so
/usr/lib/arm-linux-gnueabihf/libbinio.so
/usr/lib/arm-linux-gnueabihf/libFLAC.so
/usr/lib/arm-linux-gnueabihf/libfluidsynth.so
/usr/lib/arm-linux-gnueabihf/libaudiofile.so
/usr/lib/arm-linux-gnueabihf/libmikmod.so
/usr/lib/arm-linux-gnueabihf/libmodplug.so
/usr/lib/arm-linux-gnueabihf/libmpg123.so
/usr/lib/arm-linux-gnueabihf/libopus.so
/usr/lib/arm-linux-gnueabihf/libsidplayfp.so
/usr/lib/arm-linux-gnueabihf/libsndfile.so
/usr/lib/arm-linux-gnueabihf/libvorbis.so
/usr/lib/arm-linux-gnueabihf/libogg.so
/usr/lib/arm-linux-gnueabihf/libwavpack.so
/usr/lib/arm-linux-gnueabihf/libvorbisenc.so
/usr/lib/arm-linux-gnueabihf/libtwolame.so
/usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/libshine.so
/usr/lib/arm-linux-gnueabihf/libmpdclient.so
/lib/arm-linux-gnueabihf/libsystemd.so
/usr/lib/arm-linux-gnueabihf/libsqlite3.so
/usr/lib/arm-linux-gnueabihf/libavahi-common.so
/usr/lib/arm-linux-gnueabihf/libavahi-client.so
여기까지 의심을 품고 마치겠습니다.
'서버 > 리눅스 서버' 카테고리의 다른 글
TVH 스트리밍 QOS 스크립트 (리눅스 네트워크 대역폭 제한 / wondershaper) (0) | 2019.09.15 |
---|---|
AndroidOverLinux on Beelink GTmini-A (알파) (0) | 2019.08.03 |
[초심자] Docker 사용하기 (CLI) (0) | 2019.07.17 |
Showdown 자동 리셋 스크립트 (0) | 2019.06.24 |
TVHeadend 빌드하기 (Debian Base) (0) | 2019.05.30 |
댓글