aclap-dev / vdhcoapp

Companion application for Video DownloadHelper browser add-on
GNU General Public License v2.0
1.72k stars 280 forks source link

build-apps.sh failed : content of README.md #83

Closed PhilLAL closed 3 years ago

PhilLAL commented 3 years ago

Hi, I read README-win-linux.md and I installed following packages:

sudo apt-get -y install \
        gcc make perl \
        autoconf \
        automake \
        build-essential \
        cmake \
        git \
        libtool \
        pkg-config \
        yasm \
        gcc-mingw-w64-x86-64 \
        gcc-mingw-w64-i686 \
        gcc-multilib \
        lib32stdc++-8-dev \
        mingw-w64-tools \
        g++-mingw-w64-i686 \
        libircclient-dev \
        libxkbcommon-dev \
        libegl1-mesa-dev \
        libgles2-mesa-dev \
        libsdl2-dev

However, I got following error messages while launching ./build-apps.sh:

Building vpx
  enabling pic
  enabling shared
  disabling static
  disabling examples
  disabling tools
  disabling docs
  disabling install_bins
  disabling install_srcs
  disabling unit_tests
  enabling postproc
  enabling multi_res_encoding
  enabling vp9_temporal_denoising
  enabling vp9_postproc
  enabling vp9_highbitdepth
  enabling vp8_encoder
  enabling vp8_decoder
  enabling vp9_encoder
  enabling vp9_decoder
Configuring for target 'x86_64-linux-gcc'
    [...]
    [LD] libvpx.so.6.2.0
/usr/bin/ld: vpx_scale/vpx_scale_rtcd.c.o: in function `vpx_scale_rtcd':
vpx_scale_rtcd.c:(.text+0xbf): undefined reference to `pthread_once'
/usr/bin/ld: vpx_dsp/vpx_dsp_rtcd.c.o: in function `vpx_dsp_rtcd':
vpx_dsp_rtcd.c:(.text+0x192f): undefined reference to `pthread_once'
/usr/bin/ld: vpx_util/vpx_thread.c.o: in function `reset':
vpx_thread.c:(.text+0x209): undefined reference to `pthread_create'
/usr/bin/ld: vpx_util/vpx_thread.c.o: in function `end':
vpx_thread.c:(.text+0x347): undefined reference to `pthread_join'
/usr/bin/ld: vp8/common/rtcd.c.o: in function `vp8_rtcd':
rtcd.c:(.text+0x3bf): undefined reference to `pthread_once'
/usr/bin/ld: vp8/common/reconintra.c.o: in function `vp8_init_intra_predictors':
reconintra.c:(.text+0x3df): undefined reference to `pthread_once'
/usr/bin/ld: vp8/vp8_cx_iface.c.o: in function `vp8e_init':
vp8_cx_iface.c:(.text+0x16c3): undefined reference to `pthread_once'
/usr/bin/ld: vp8/encoder/encodeframe.c.o: in function `vp8_encode_frame':
encodeframe.c:(.text+0x1fe8): undefined reference to `sem_post'
/usr/bin/ld: encodeframe.c:(.text+0x2135): undefined reference to `sem_wait'
/usr/bin/ld: vp8/encoder/ethreading.c.o: in function `thread_loopfilter':
ethreading.c:(.text+0x34): undefined reference to `sem_wait'
/usr/bin/ld: ethreading.c:(.text+0x6a): undefined reference to `sem_post'
/usr/bin/ld: vp8/encoder/ethreading.c.o: in function `thread_encoding_proc':
ethreading.c:(.text+0xe8): undefined reference to `sem_wait'
/usr/bin/ld: ethreading.c:(.text+0x80a): undefined reference to `sem_post'
/usr/bin/ld: vp8/encoder/ethreading.c.o: in function `vp8cx_create_encoder_threads':
ethreading.c:(.text+0x1207): undefined reference to `sem_init'
/usr/bin/ld: ethreading.c:(.text+0x121a): undefined reference to `sem_init'
/usr/bin/ld: ethreading.c:(.text+0x124b): undefined reference to `pthread_create'
/usr/bin/ld: ethreading.c:(.text+0x129f): undefined reference to `pthread_join'
/usr/bin/ld: ethreading.c:(.text+0x12ae): undefined reference to `sem_destroy'
/usr/bin/ld: ethreading.c:(.text+0x12bd): undefined reference to `sem_destroy'
/usr/bin/ld: ethreading.c:(.text+0x134e): undefined reference to `sem_init'
/usr/bin/ld: ethreading.c:(.text+0x135a): undefined reference to `sem_init'
/usr/bin/ld: ethreading.c:(.text+0x137d): undefined reference to `pthread_create'
/usr/bin/ld: ethreading.c:(.text+0x13ae): undefined reference to `sem_post'
/usr/bin/ld: ethreading.c:(.text+0x13bd): undefined reference to `sem_post'
/usr/bin/ld: ethreading.c:(.text+0x13cf): undefined reference to `pthread_join'
/usr/bin/ld: ethreading.c:(.text+0x13de): undefined reference to `sem_destroy'
/usr/bin/ld: ethreading.c:(.text+0x13ed): undefined reference to `sem_destroy'
/usr/bin/ld: ethreading.c:(.text+0x13fe): undefined reference to `sem_destroy'
/usr/bin/ld: ethreading.c:(.text+0x1406): undefined reference to `sem_destroy'
/usr/bin/ld: ethreading.c:(.text+0x150b): undefined reference to `sem_init'
/usr/bin/ld: ethreading.c:(.text+0x1517): undefined reference to `sem_init'
/usr/bin/ld: ethreading.c:(.text+0x153a): undefined reference to `pthread_create'
/usr/bin/ld: vp8/encoder/ethreading.c.o: in function `vp8cx_remove_encoder_threads':
ethreading.c:(.text+0x15a2): undefined reference to `sem_post'
/usr/bin/ld: ethreading.c:(.text+0x15b1): undefined reference to `sem_post'
/usr/bin/ld: ethreading.c:(.text+0x15c7): undefined reference to `pthread_join'
/usr/bin/ld: ethreading.c:(.text+0x15d6): undefined reference to `sem_destroy'
/usr/bin/ld: ethreading.c:(.text+0x15e5): undefined reference to `sem_destroy'
/usr/bin/ld: ethreading.c:(.text+0x15fd): undefined reference to `sem_post'
/usr/bin/ld: ethreading.c:(.text+0x160b): undefined reference to `pthread_join'
/usr/bin/ld: ethreading.c:(.text+0x1617): undefined reference to `sem_destroy'
/usr/bin/ld: ethreading.c:(.text+0x161f): undefined reference to `sem_destroy'
/usr/bin/ld: vp8/encoder/onyx_if.c.o: in function `vp8_loopfilter_frame':
onyx_if.c:(.text+0x3f80): undefined reference to `sem_post'
/usr/bin/ld: vp8/encoder/onyx_if.c.o: in function `encode_frame_to_data_rate':
onyx_if.c:(.text+0x55f6): undefined reference to `sem_post'
/usr/bin/ld: onyx_if.c:(.text+0x560c): undefined reference to `sem_wait'
/usr/bin/ld: vp8/encoder/onyx_if.c.o: in function `vp8_get_compressed_data':
onyx_if.c:(.text+0x93a0): undefined reference to `sem_wait'
/usr/bin/ld: vp8/decoder/onyxd_if.c.o: in function `create_decompressor.isra.1':
onyxd_if.c:(.text+0x11f): undefined reference to `pthread_once'
/usr/bin/ld: vp8/decoder/threading.c.o: in function `mt_decode_mb_rows':
threading.c:(.text+0x16ea): undefined reference to `sem_post'
/usr/bin/ld: vp8/decoder/threading.c.o: in function `thread_decoding_proc':
threading.c:(.text+0x174c): undefined reference to `sem_wait'
/usr/bin/ld: threading.c:(.text+0x179b): undefined reference to `sem_post'
/usr/bin/ld: vp8/decoder/threading.c.o: in function `vp8_decoder_create_threads':
threading.c:(.text+0x18ee): undefined reference to `sem_init'
/usr/bin/ld: threading.c:(.text+0x1964): undefined reference to `pthread_create'
/usr/bin/ld: threading.c:(.text+0x1998): undefined reference to `sem_init'
/usr/bin/ld: threading.c:(.text+0x1a06): undefined reference to `sem_destroy'
/usr/bin/ld: threading.c:(.text+0x1a3b): undefined reference to `sem_destroy'
/usr/bin/ld: vp8/decoder/threading.c.o: in function `vp8_decoder_remove_threads':
threading.c:(.text+0x233f): undefined reference to `sem_post'
/usr/bin/ld: threading.c:(.text+0x2355): undefined reference to `pthread_join'
/usr/bin/ld: threading.c:(.text+0x2383): undefined reference to `sem_destroy'
/usr/bin/ld: threading.c:(.text+0x2410): undefined reference to `sem_destroy'
/usr/bin/ld: vp8/decoder/threading.c.o: in function `vp8mt_decode_mb_rows':
threading.c:(.text+0x2926): undefined reference to `sem_post'
/usr/bin/ld: threading.c:(.text+0x298f): undefined reference to `sem_wait'
/usr/bin/ld: threading.c:(.text+0x29ff): undefined reference to `sem_wait'
/usr/bin/ld: vp9/common/vp9_rtcd.c.o: in function `vp9_rtcd':
vp9_rtcd.c:(.text+0x3af): undefined reference to `pthread_once'
/usr/bin/ld: vp9/common/vp9_thread_common.c.o: in function `loop_filter_row_worker':
vp9_thread_common.c:(.text+0x245): undefined reference to `pthread_mutex_trylock'
/usr/bin/ld: vp9_thread_common.c:(.text+0x309): undefined reference to `pthread_mutex_trylock'
/usr/bin/ld: vp9/common/vp9_thread_common.c.o: in function `vp9_loopfilter_rows':
vp9_thread_common.c:(.text+0xf94): undefined reference to `pthread_mutex_trylock'
/usr/bin/ld: vp9_thread_common.c:(.text+0x104c): undefined reference to `pthread_mutex_trylock'
/usr/bin/ld: vp9/common/vp9_thread_common.c.o: in function `vp9_loopfilter_job':
vp9_thread_common.c:(.text+0x1505): undefined reference to `pthread_mutex_trylock'
/usr/bin/ld: vp9/common/vp9_thread_common.c.o:vp9_thread_common.c:(.text+0x15c1): more undefined references to `pthread_mutex_trylock' follow
/usr/bin/ld: vp9/common/vp9_reconintra.c.o: in function `vp9_init_intra_predictors':
vp9_reconintra.c:(.text+0x1e4f): undefined reference to `pthread_once'
/usr/bin/ld: vp9/vp9_cx_iface.c.o: in function `encoder_init':
vp9_cx_iface.c:(.text+0x42b3): undefined reference to `pthread_once'
/usr/bin/ld: vp9/decoder/vp9_decoder.c.o: in function `vp9_decoder_create':
vp9_decoder.c:(.text+0xa33): undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:392: libvpx.so.6.2.0] Error 1
make: *** [Makefile:17: .DEFAULT] Error 2

Do you have any idea where pthread need to be enabled? Thank you.

PhilLAL commented 3 years ago

I forgot to notify @mi-g My apologies if unnecessary. :)

PhilLAL commented 3 years ago

does anyone have any idea how to solve this? Did I miss some obvious config or instruction? Cheers

mi-g commented 3 years ago

I just released version 1.6.0. Build scripts have been updated and now compiles on Ubuntu 16.04, Ubuntu 18.04 and 20.02. Note that you will have to re-run the script get-sources.sh

mi-g commented 3 years ago

Closing this bug. Please reopen if needed

PhilLAL commented 3 years ago

Sorry, but I can't reopen this issue.

When running ./build-apps.sh I got following output:

Creating makefiles for x86_64-win64-gcc libs
    [CREATE] vpx_scale_rtcd.h
    [CREATE] vpx_dsp_rtcd.h
    [CREATE] vp8_rtcd.h
    [CREATE] vp9_rtcd.h
    [DEP] vp9/common/x86/vp9_mfqe_sse2.asm.d
    [DEP] vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm.d
    [DEP] vp9/encoder/x86/vp9_error_sse2.asm.d
[...]
    [CC] vpx_dsp/x86/sum_squares_sse2.c.o
    [CC] vpx_dsp/x86/sad4d_avx2.c.o
    [CC] vpx_dsp/x86/sad_avx2.c.o
    [CC] vpx_dsp/x86/sad4d_avx512.c.o
/tmp/ccXQjMvK.s: Messages de l'assembleur:
/tmp/ccXQjMvK.s:19: Erreur: invalid register for .seh_savexmm
make[1]: *** [Makefile:158: vpx_dsp/x86/sad4d_avx512.c.o] Error 1
make: *** [Makefile:17: .DEFAULT] Error 2*
mi-g commented 3 years ago

On what system are you compiling ? This works well for me on clean installs of Ubuntu 16.04, 18.04 and 20.04 with installed compilation packages as described in the readme file. Some assembly code requires either yasm or nasm. I always used yasm. Maybe the problem is if you are using nasm.

PhilLAL commented 3 years ago

Thank you. I build it on debian 10, with yasm package installed.

Last lines make me read converter/src/vpx/build/make/Makefile on line 158 It is last line of

$(BUILD_PFX)%.c.o: %.c
        $(if $(quiet),@echo "    [CC] $@")
        $(qexec)$(if $(CONFIG_DEPENDENCY_TRACKING),,mkdir -p $(dir $@))
        $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $<
mi-g commented 3 years ago

Compiling ffmpeg and the 18 associated libraries is tricky and very dependent on the compilation tools. In my setup i use ubuntu 16.04 (for glibc 2.23) and 18.04 virtual machines (server installs as there is no need for a user interface) on VirtualBox dedicated to compiling the coapp. I suggest you do the same, as tracking why it does not work in a specific would be an endless tedious job :)