I'm trying to compile a static build of MP4Box by using the following:
`git clone https://github.com/gpac/gpac.git gpac
cd gpac
./configure --static-mp4box --enable-static-bin --use-zlib=no
make -j4`
However, the resulting MP4Box binary is still dynamically linked to some libraries:
` file bin/gcc/MP4Box
bin/gcc/MP4Box: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=116d5d167807300dc3c1685156e0d91dfa66783c, not stripped `
`ldd bin/gcc/MP4Box
	linux-vdso.so.1 (0x00007fff794af000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa853c74000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa853a55000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa853851000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa853460000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa854a25000)`

I'm trying on a Ubuntu 18.04.5, with GNU make 4.1
I had to manually edit config.mak file and add "-static" at the end of LDFLAGS variable.
This raises few errors:
`../../bin/gcc/libgpac_static.a(vrml_js.o): In function `qjs_module_loader':
vrml_js.c:(.text+0x7bc1): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../../bin/gcc/libgpac_static.a(os_net.o): In function `gf_sk_get_ipv6_addr':
os_net.c:(.text+0x98): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
make[2]: Leaving directory '/home/user/git/gpac/applications/gpac'
make[2]: Entering directory '/home/user/git/gpac/applications/mp4box'
../../bin/gcc/libgpac_static.a(dec_nvdec_sdk.o): In function `cuInit':
dec_nvdec_sdk.c:(.text+0xc2): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../../bin/gcc/libgpac_static.a(os_net.o): In function `gf_sk_get_ipv6_addr':
os_net.c:(.text+0x98): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking`

But now, the MP4Box binary is statically linked:
`bin/gcc/MP4Box: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=159d1b7f87feca3a55747995fb655244cb596819, with debug_info, not stripped`

- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ ] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

Failed to build statically linked MP4Box
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Failed to build statically linked MP4Box
Issue date:

--- start body ---
I'm trying to compile a static build of MP4Box by using the following:
`git clone https://github.com/gpac/gpac.git gpac
cd gpac
./configure --static-mp4box --enable-static-bin --use-zlib=no
make -j4`
However, the resulting MP4Box binary is still dynamically linked to some libraries:
` file bin/gcc/MP4Box
bin/gcc/MP4Box: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=116d5d167807300dc3c1685156e0d91dfa66783c, not stripped `
`ldd bin/gcc/MP4Box
	linux-vdso.so.1 (0x00007fff794af000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa853c74000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa853a55000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa853851000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa853460000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa854a25000)`

I'm trying on a Ubuntu 18.04.5, with GNU make 4.1
I had to manually edit config.mak file and add "-static" at the end of LDFLAGS variable.
This raises few errors:
`../../bin/gcc/libgpac_static.a(vrml_js.o): In function `qjs_module_loader':
vrml_js.c:(.text+0x7bc1): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../../bin/gcc/libgpac_static.a(os_net.o): In function `gf_sk_get_ipv6_addr':
os_net.c:(.text+0x98): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
make[2]: Leaving directory '/home/user/git/gpac/applications/gpac'
make[2]: Entering directory '/home/user/git/gpac/applications/mp4box'
../../bin/gcc/libgpac_static.a(dec_nvdec_sdk.o): In function `cuInit':
dec_nvdec_sdk.c:(.text+0xc2): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../../bin/gcc/libgpac_static.a(os_net.o): In function `gf_sk_get_ipv6_addr':
os_net.c:(.text+0x98): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking`

But now, the MP4Box binary is statically linked:
`bin/gcc/MP4Box: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=159d1b7f87feca3a55747995fb655244cb596819, with debug_info, not stripped`

- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [ ] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/

--- end body ---

None