alsa-project / alsa-plugins

The Advanced Linux Sound Architecture (ALSA) - plugins
GNU Lesser General Public License v2.1
41 stars 28 forks source link

cannot stat '.libs/libasound_module_ctl_oss.so' #51

Open magic-tab-01 opened 1 year ago

magic-tab-01 commented 1 year ago

hello i have a problem about "make install" after i compile it with cross-compiler, i want to run make intall, but after make install, some error occured as followed,could you kindly help?

magic@VM-work:alsa-plugins$ make install Making install in doc make[1]: Entering directory '/home/magic/work/opensource/AVB_TSN/alsa-plugins/alsa-plugins/doc' make[2]: Entering directory '/home/magic/work/opensource/AVB_TSN/alsa-plugins/alsa-plugins/doc' make[2]: Nothing to be done for 'install-exec-am'. make[2]: Nothing to be done for 'install-data-am'. make[2]: Leaving directory '/home/magic/work/opensource/AVB_TSN/alsa-plugins/alsa-plugins/doc' make[1]: Leaving directory '/home/magic/work/opensource/AVB_TSN/alsa-plugins/alsa-plugins/doc' Making install in oss make[1]: Entering directory '/home/magic/work/opensource/AVB_TSN/alsa-plugins/alsa-plugins/oss' make[2]: Entering directory '/home/magic/work/opensource/AVB_TSN/alsa-plugins/alsa-plugins/oss' make[2]: Nothing to be done for 'install-exec-am'. /usr/bin/mkdir -p '/home/magic/work/opensource/AVB_TSN/out/lib/alsa-lib' /bin/bash ../libtool --mode=install /usr/bin/install -c libasound_module_ctl_oss.la '/home/magic/work/opensource/AVB_TSN/out/lib/alsa-lib' libtool: install: /usr/bin/install -c .libs/libasound_module_ctl_oss.so /home/magic/work/opensource/AVB_TSN/out/lib/alsa-lib/libasound_module_ctl_oss.so /usr/bin/install: cannot stat '.libs/libasound_module_ctl_oss.so': No such file or directory make[2]: [Makefile:411: install-asound_module_ctl_ossLTLIBRARIES] Error 1 make[2]: Leaving directory '/home/magic/work/opensource/AVB_TSN/alsa-plugins/alsa-plugins/oss' make[1]: [Makefile:646: install-am] Error 2 make[1]: Leaving directory '/home/magic/work/opensource/AVB_TSN/alsa-plugins/alsa-plugins/oss' make: *** [Makefile:443: install-recursive] Error 1

magic-tab-01 commented 1 year ago

add some hint for this question, the compiler is cross-compiler, i have configured it as "LD="home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/toolchain/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ld" CC="/home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/toolchain/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc --sysroot=/home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/sysroot" ./configure --host=arm-linux --prefix=/home/magic/work/opensource/AVB_TSN/out " i have try to compile it with gcc, the result is good, and i have compare the compile result between gcc and cross-gcc, i found some difference as below: 1) in the result of gcc, the libasound_module_ctl_oss.so has been build, but cross-gcc not, because i can find output "/bin/bash ../libtool --tag=CC --mode=link gcc -Wall -g -I/home/magic/work/opensource/AVB_TSN/out/include -g -O2 -module -avoid-version -export-dynamic -no-undefined -Wl,--no-undefined -o libasound_module_ctl_oss.la -rpath /home/magic/work/opensource/AVB_TSN/out/lib/alsa-lib ctl_oss.lo -L/home/magic/work/opensource/AVB_TSN/out/lib -lasound -lasound libtool: link: gcc -shared -fPIC -DPIC .libs/ctl_oss.o -Wl,-rpath -Wl,/home/magic/work/opensource/AVB_TSN/out/lib -Wl,-rpath -Wl,/home/magic/work/opensource/AVB_TSN/out/lib -L/home/magic/work/opensource/AVB_TSN/out/lib /home/magic/work/opensource/AVB_TSN/out/lib/libasound.so -g -g -O2 -Wl,--no-undefined -Wl,-soname -Wl,libasound_module_ctl_oss.so -o .libs/libasound_module_ctl_oss.so" in the gcc result, but i can't found "something like" in the cross-gcc output,

could you kindly help?

perexg commented 1 year ago

Use make V=1 to see the real libtool commands. It seems that you have something misconfigured - check the libtool script, if the LTCC variable is changed according your instructions.

magic-tab-01 commented 1 year ago

really appreciate for your help, i have tried to make with v=1, the output like this: can_not_find_ibasound_module_ctl_oss.txt

and i have grep "LTCC", the output like :

./libtool:164:LTCC="/home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/toolchain/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc --sysroot=/home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/sysroot"
./libtool:166:# LTCC compiler flags.
./libtool:2635:       compiler:       $LTCC
./libtool:5436: func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
./libtool:9774:   if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
./libtool:9822:     if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
./libtool:11144:          $LTCC $LTCFLAGS -o $cwrapper $cwrappersource

question: i have no idea about how to solve it, could you kindly help?

perexg commented 1 year ago

I see missing lines like:

libtool: link: gcc -shared  -fPIC -DPIC  .libs/ctl_oss.o   -lasound  -g -O2 -g -Wl,-z -Wl,defs   -Wl,-soname -Wl,libasound_module_ctl_oss.so -o .libs/libasound_module_ctl_oss.so

Manually invoked libtool on x86_64 (no cross) in the oss subdirectory:

$ /bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall -g  -O2 -Wall -W -pipe -g -module -avoid-version -export-dynamic -no-undefined -Wl,-z,defs  -o libasound_module_ctl_oss.la -rpath /usr/lib64/alsa-lib ctl_oss.lo -lasound  -lasound 

libtool: link: rm -fr  .libs/libasound_module_ctl_oss.la .libs/libasound_module_ctl_oss.lai .libs/libasound_module_ctl_oss.so
libtool: link: gcc -shared  -fPIC -DPIC  .libs/ctl_oss.o   -lasound  -g -O2 -g -Wl,-z -Wl,defs   -Wl,-soname -Wl,libasound_module_ctl_oss.so -o .libs/libasound_module_ctl_oss.so
libtool: link: ( cd ".libs" && rm -f "libasound_module_ctl_oss.la" && ln -s "../libasound_module_ctl_oss.la" "libasound_module_ctl_oss.la" )

Note that your command is different:

/bin/bash ../libtool  --tag=CC   --mode=link /home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/toolchain/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc --sysroot=/home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/sysroot -Wall -g -I/home/magic/work/opensource/AVB_TSN/out/include -g -O2 -module -avoid-version -export-dynamic -no-undefined -Wl,--no-undefined  -o libasound_module_ctl_oss.la -rpath /home/magic/work/opensource/AVB_TSN/out/lib/alsa-lib ctl_oss.lo -L/home/magic/work/opensource/AVB_TSN/out/lib -lasound -lasound 

libtool: link: ( cd ".libs" && rm -f "libasound_module_ctl_oss.la" && ln -s "../libasound_module_ctl_oss.la" "libasound_module_ctl_oss.la" )

So your libtool script does not produce any .so files for a reason without error.

magic-tab-01 commented 1 year ago

hello thank you for your quicky reply. yes, i have found it, but i don't know how to fix it, my configure is:

LD="home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/toolchain/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ld" CC="/home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/toolchain/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc --sysroot=/home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/sysroot" ./configure --host=arm-linux --prefix=/home/magic/work/opensource/AVB_TSN/out

and i have try to with --enable-shared=yes, the command like it : LD="home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/toolchain/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ld" CC="/home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/toolchain/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc --sysroot=/home/magic/work/zeekr_git/zeek/FwToollink/crosstool/gcc-cross-aarch64-8.2.0/sysroot" ./configure --enable-shared=yes --host=arm-linux --prefix=/home/magic/work/opensource/AVB_TSN/out

but can not fix it,