Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linphone does not build #17793

Closed
stapelberg opened this issue Aug 17, 2016 · 4 comments
Closed

linphone does not build #17793

stapelberg opened this issue Aug 17, 2016 · 4 comments

Comments

@stapelberg
Copy link
Contributor

Issue description

unpacking sources
unpacking source archive /nix/store/pdvi2adyxlc1gziw062bdldmwcndnq32-linphone-3.8.5.tar.gz
source root is linphone-3.8.5
setting SOURCE_DATE_EPOCH to timestamp 1435676784 of file linphone-3.8.5/coreapi/liblinphone_gitversion.h
patching sources
configuring
fixing libtool script ./ltmain.sh
configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/k5swi0dhavjm2y98mcmdkf0rw898baly-linphone-3.8.5 --enable-ldap --with-ffmpeg=/nix/store/z16dcmj07yk0g4bxinxcanwq73b1vvy9-ffmpeg-2.8.6-dev --with-polarssl=/nix/store/38lv51wsjphlg4j55s5lg3qiqc57an0h-mbedtls-2.3.0 --enable-lime --enable-external-ortp --enable-external-mediastreamer 
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure: linphone-3.8.5       A full featured audio/video sip phone.
configure: licensed under the terms of the General Public License (GPL)
checking for a BSD-compatible install... /nix/store/07axizqswlwc819xcd8dk2m1q0ylddmh-coreutils-8.25/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /nix/store/07axizqswlwc819xcd8dk2m1q0ylddmh-coreutils-8.25/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... none
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking if gcc/ld supports -Wl,--output-def... no
checking for strerror in -lcposix... no
checking for inline... inline
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /nix/store/6nh1pgzsrf71xx2gy5x61czhwgd0b55y-gnugrep-2.25/bin/grep
checking for egrep... /nix/store/6nh1pgzsrf71xx2gy5x61czhwgd0b55y-gnugrep-2.25/bin/grep -E
checking for ANSI C header files... yes
checking for md5sum... md5sum
checking whether NLS is requested... yes
checking for intltool >= 0.40... 0.51.0 found
checking for intltool-update... /nix/store/6k8km5d843mb7yak88mnp23jqv5q83z9-intltool-0.51.0/bin/intltool-update
checking for intltool-merge... /nix/store/6k8km5d843mb7yak88mnp23jqv5q83z9-intltool-0.51.0/bin/intltool-merge
checking for intltool-extract... /nix/store/6k8km5d843mb7yak88mnp23jqv5q83z9-intltool-0.51.0/bin/intltool-extract
checking for xgettext... /nix/store/zd4jxcablghpaawqw80v591gik1krwhq-gettext-0.19.8/bin/xgettext
checking for msgmerge... /nix/store/zd4jxcablghpaawqw80v591gik1krwhq-gettext-0.19.8/bin/msgmerge
checking for msgfmt... /nix/store/zd4jxcablghpaawqw80v591gik1krwhq-gettext-0.19.8/bin/msgfmt
checking for gmsgfmt... /nix/store/zd4jxcablghpaawqw80v591gik1krwhq-gettext-0.19.8/bin/msgfmt
checking for perl... /nix/store/xlqafmhfnzwg0c77ns8m41k2vn1frqz3-perl-5.22.2/bin/perl
checking for perl >= 5.8.1... 5.22.2
checking how to print strings... printf
checking for a sed that does not truncate output... /nix/store/8ga3jbvr2q2jy9g27b9iy8c746nr20q4-gnused-4.2.2/bin/sed
checking for fgrep... /nix/store/6nh1pgzsrf71xx2gy5x61czhwgd0b55y-gnugrep-2.25/bin/grep -F
checking for ld used by gcc... /nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld
checking if the linker (/nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /nix/store/lfvkcv5kvcpjlmsxcn9nv0lhcg5h2zyp-binutils-2.26.1/bin/nm -B
checking the name lister (/nix/store/lfvkcv5kvcpjlmsxcn9nv0lhcg5h2zyp-binutils-2.26.1/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /nix/store/lfvkcv5kvcpjlmsxcn9nv0lhcg5h2zyp-binutils-2.26.1/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /nix/store/07axizqswlwc819xcd8dk2m1q0ylddmh-coreutils-8.25/bin/dd
checking how to truncate binary pipes... /nix/store/07axizqswlwc819xcd8dk2m1q0ylddmh-coreutils-8.25/bin/dd bs=4096 count=1
./configure: line 8464: /usr/bin/file: No such file or directory
checking for mt... no
checking if : is a manifest tool... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld
checking if the linker (/nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld) is GNU ld... yes
checking whether the g++ linker (/nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: Enable library dependencies linking: 
checking for pkg-config... /nix/store/zwbfwxkbjgg6hd25y99fmj3vdsy626qp-pkg-config-0.29/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for msgfmt... (cached) /nix/store/zd4jxcablghpaawqw80v591gik1krwhq-gettext-0.19.8/bin/msgfmt
checking for gmsgfmt... (cached) /nix/store/zd4jxcablghpaawqw80v591gik1krwhq-gettext-0.19.8/bin/msgfmt
checking for xgettext... (cached) /nix/store/zd4jxcablghpaawqw80v591gik1krwhq-gettext-0.19.8/bin/xgettext
checking for msgmerge... (cached) /nix/store/zd4jxcablghpaawqw80v591gik1krwhq-gettext-0.19.8/bin/msgmerge
checking for ld used by GCC... /nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld
checking if the linker (/nix/store/4mhq8ic8wk46wpwjyghap1x7xfdk2rj3-gcc-wrapper-5.4.0/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for get_current_dir_name... yes
checking for strndup... yes
checking for stpcpy... yes
checking for LDAP... no
checking for ldap_initialize in -lldap... yes
checking ldap.h usability... yes
checking ldap.h presence... yes
checking for ldap.h... yes
checking for SASL... yes
checking for LIBUPNP... yes
checking for ZLIB... yes
configure: ZLIB found
checking for LIBXML2... yes
checking for LIBGTK... yes
checking for LIBGLIB... yes
checking for NOTIFY4... yes
checking for NOTIFY1... no
checking for getifaddrs... yes
checking readline.h usability... no
checking readline.h presence... no
checking for readline.h... no
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking history.h usability... no
checking history.h presence... no
checking for history.h... no
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking for readline in -lreadline... yes
checking whether byte ordering is bigendian... no
checking for SPEEX... yes
checking X11/Xlib.h usability... yes
checking X11/Xlib.h presence... yes
checking for X11/Xlib.h... yes
checking for XUnmapWindow in -lX11... yes
checking polarssl/gcm.h usability... no
checking polarssl/gcm.h presence... no
checking for polarssl/gcm.h... no
configure: error: "LIME requires POLARSSL in version >= 1.3"
builder for ‘/nix/store/q8ykdqkjjspm2mkdb5873ypyl7g93qra-linphone-3.8.5.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/2abdz8c96pmfr145szps7z26p33vrlin-system-path.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/r8azrrq031w2zabzljgv5ra71s8jwhcg-nixos-system-nix1-16.09pre88185.52a875f.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/r8azrrq031w2zabzljgv5ra71s8jwhcg-nixos-system-nix1-16.09pre88185.52a875f.drv’ failed

I think this issue was introduced by commit 69db5f5, which upgrades mbedtls from 1.3 to 2.3. See also https://tls.mbed.org/tech-updates/releases/mbedtls-2.0.0-released, which states:

This release makes the full migration from our old PolarSSL name to the new mbed TLS name. This is reflected in the way files, directories, variables, etc are all named. As a result every function name and most defines have changed.

@fpletz I’m curious why this breakage was not detected at the time when you upgraded mbedtls? Don’t we have tools to rebuild all reverse-dependencies?

AFAICT, linphone doesn’t support mbedtls yet. When checking out its git repository (commit 4c2268e2de1cf3fd503e3682e2e2ad77bbebc950), configure.ac still checks for polarssl/gcm.h.

What’s the preferred way of fixing this issue? Should we continue to provide the mbedtls 1.3 series? Or should we try to migrate linphone to mbedtls 2 and contribute that patch upstream?

Steps to reproduce

  1. Add linphone to environment.systemPackages
  2. Run nixos-rebuild switch --upgrade

Technical details

  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
    • 16.09pre87999.20f009d (Flounder)
  • Nix version: (run nix-env --version)
    • nix-env (Nix) 1.11.2
  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
    • "16.09pre88185.52a875f"
@stapelberg
Copy link
Contributor Author

FWIW, linphone requires more fixes. Even when using mbedtls 1.3.17, I get:

linphonecall.c: In function 'linphone_call_init_audio_stream':
linphonecall.c:1942:5: error: implicit declaration of function 'audio_stream_enable_dtls' [-Werror=implicit-function-declaration]
     audio_stream_enable_dtls(call->audiostream,&params);
     ^
linphonecall.c: In function 'linphone_call_init_video_stream':
linphonecall.c:2052:6: error: implicit declaration of function 'video_stream_enable_dtls' [-Werror=implicit-function-declaration]
      video_stream_enable_dtls(call->videostream,&params);
      ^
linphonecall.c: In function 'linphone_call_start_audio_stream':
linphonecall.c:2538:6: error: implicit declaration of function 'media_stream_set_srtp_recv_key_b64' [-Werror=implicit-function-declaration]
      media_stream_set_srtp_recv_key_b64(&(call->audiostream->ms.sessions),stream->crypto[0].algo,stream->crypto[0].master_key);
      ^
linphonecall.c:2539:6: error: implicit declaration of function 'media_stream_set_srtp_send_key_b64' [-Werror=implicit-function-declaration]
      media_stream_set_srtp_send_key_b64(&(call->audiostream->ms.sessions),stream->crypto[0].algo,local_st_desc->crypto[crypto_idx].master_key);
      ^
linphonecall.c:2565:4: error: implicit declaration of function 'media_stream_session_encryption_mandatory_enable' [-Werror=implicit-function-declaration]
    media_stream_session_encryption_mandatory_enable(&call->audiostream->ms.sessions,linphone_core_is_media_encryption_mandatory(call->core));
    ^
linphonecall.c: In function 'linphone_call_start_video_stream':
linphonecall.c:2613:4: error: unknown type name 'VideoStreamDir'
    VideoStreamDir dir=VideoStreamSendRecv;
    ^
linphonecall.c:2613:23: error: 'VideoStreamSendRecv' undeclared (first use in this function)
    VideoStreamDir dir=VideoStreamSendRecv;
                       ^
linphonecall.c:2613:23: note: each undeclared identifier is reported only once for each function it appears in
linphonecall.c:2630:57: error: passing argument 2 of 'video_stream_set_native_window_id' makes pointer from integer without a cast [-Werror=int-conversion]
     video_stream_set_native_window_id(call->videostream,call->video_window_id);
                                                         ^
In file included from linphonecore.h:26:0,
                 from linphonecall.c:24:
/nix/store/5sjkyppg5mmi831g5dwikzkghy82z996-mediastreamer-2.12.1/include/mediastreamer2/mediastream.h:991:17: note: expected 'void *' but argument is of type 'long unsigned int'
 MS2_PUBLIC void video_stream_set_native_window_id(VideoStream *stream, void *id);
                 ^
linphonecall.c:2632:57: error: passing argument 2 of 'video_stream_set_native_window_id' makes pointer from integer without a cast [-Werror=int-conversion]
     video_stream_set_native_window_id(call->videostream,lc->video_window_id);
                                                         ^
In file included from linphonecore.h:26:0,
                 from linphonecall.c:24:
/nix/store/5sjkyppg5mmi831g5dwikzkghy82z996-mediastreamer-2.12.1/include/mediastreamer2/mediastream.h:991:17: note: expected 'void *' but argument is of type 'long unsigned int'
 MS2_PUBLIC void video_stream_set_native_window_id(VideoStream *stream, void *id);
                 ^
linphonecall.c:2634:66: error: passing argument 2 of 'video_stream_set_native_preview_window_id' makes pointer from integer without a cast [-Werror=int-conversion]
     video_stream_set_native_preview_window_id (call->videostream,lc->preview_window_id);
                                                                  ^
In file included from linphonecore.h:26:0,
                 from linphonecall.c:24:
/nix/store/5sjkyppg5mmi831g5dwikzkghy82z996-mediastreamer-2.12.1/include/mediastreamer2/mediastream.h:992:17: note: expected 'void *' but argument is of type 'long unsigned int'
 MS2_PUBLIC void video_stream_set_native_preview_window_id(VideoStream *stream, void *id);
                 ^
linphonecall.c:2639:10: error: 'VideoStreamRecvOnly' undeclared (first use in this function)
      dir=VideoStreamRecvOnly;
          ^
linphonecall.c:2641:10: error: 'VideoStreamSendOnly' undeclared (first use in this function)
      dir=VideoStreamSendOnly;
          ^
linphonecall.c: In function 'linphone_call_handle_stream_events':
linphonecall.c:3593:8: error: 'AudioStreamType' undeclared (first use in this function)
   case AudioStreamType:
        ^
linphonecall.c:3596:8: error: 'VideoStreamType' undeclared (first use in this function)
   case VideoStreamType:
        ^
linphonecall.c: In function 'linphone_call_get_native_video_window_id':
linphonecall.c:3913:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
   return video_stream_get_native_window_id(call->videostream);
          ^
linphonecall.c: In function 'linphone_call_set_native_video_window_id':
linphonecall.c:3923:56: error: passing argument 2 of 'video_stream_set_native_window_id' makes pointer from integer without a cast [-Werror=int-conversion]
   video_stream_set_native_window_id(call->videostream, id);
                                                        ^
In file included from linphonecore.h:26:0,
                 from linphonecall.c:24:
/nix/store/5sjkyppg5mmi831g5dwikzkghy82z996-mediastreamer-2.12.1/include/mediastreamer2/mediastream.h:991:17: note: expected 'void *' but argument is of type 'long unsigned int'
 MS2_PUBLIC void video_stream_set_native_window_id(VideoStream *stream, void *id);
                 ^
cc1: all warnings being treated as errors
make[4]: *** [Makefile:894: linphonecall.lo] Error 1
make[4]: Leaving directory '/tmp/nix-build-linphone-3.8.5.drv-0/linphone-3.8.5/coreapi'
make[3]: *** [Makefile:977: all-recursive] Error 1
make[3]: Leaving directory '/tmp/nix-build-linphone-3.8.5.drv-0/linphone-3.8.5/coreapi'
make[2]: *** [Makefile:670: all] Error 2
make[2]: Leaving directory '/tmp/nix-build-linphone-3.8.5.drv-0/linphone-3.8.5/coreapi'
make[1]: *** [Makefile:583: all-recursive] Error 1
make[1]: Leaving directory '/tmp/nix-build-linphone-3.8.5.drv-0/linphone-3.8.5'
make: *** [Makefile:511: all] Error 2
builder for ‘/nix/store/mb3pip8yddd17wn7vmg48vl98wagjq7w-linphone-3.8.5.drv’ failed with exit code 2
error: build of ‘/nix/store/mb3pip8yddd17wn7vmg48vl98wagjq7w-linphone-3.8.5.drv’ failed

@stapelberg
Copy link
Contributor Author

Bumping linphone to 3.9.1 and belle-sip to 1.4.2, using mbedtls 1.3.17 with linphone, I can get it to build.

When running linphone and trying to open the Preferences window, it crashes saying “trace trap” on the command line. I suppose a somewhat broken linphone is better than no linphone at all, though?

@pSub
Copy link
Member

pSub commented Dec 15, 2016

Yes. Please make a PR if you are still interested.

@alexeymuranov
Copy link
Contributor

This issue looks a bit outdated (#18334). Linphone 4.0 is out, and the next version is expected next week.

@pSub pSub closed this as completed Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants