Bug 234198 - net/freerdp: Fails to build with libressl (undefined reference to `SSL_CTX_set_security_level')
Summary: net/freerdp: Fails to build with libressl (undefined reference to `SSL_CTX_se...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Kyle Evans
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2018-12-20 07:01 UTC by aryeh.friedman
Modified: 2018-12-25 08:25 UTC (History)
4 users (show)

See Also:
meta: maintainer-feedback+
meta: merge-quarterly-


Attachments
fix-build-with-libressl (1.06 KB, patch)
2018-12-21 06:53 UTC, Koichiro Iwao
kevans: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description aryeh.friedman 2018-12-20 07:01:47 UTC
Fails to build with libressl-2.8.3:

Environment:

FreeBSD lilith 11.2-RELEASE-p4 FreeBSD 11.2-RELEASE-p4 #0 r339065: Mon Oct  1 14:01:40 EDT 2018     root@lilith:/usr/obj/usr/src/sys/GENERIC  amd64

Error snippet:

[1/2] : && /usr/bin/cc -O2 -pipe  -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-unused-command-line-argument -Wno-deprecated-declarations -DWINPR_DLL -O2 -pipe  -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -Wl,-rpath,/usr/local/lib -fstack-protector client/X11/CMakeFiles/xfreerdp-client.dir/xf_gdi.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_gfx.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_rail.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_tsmf.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_input.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_event.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_floatbar.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_channels.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_cliprdr.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_monitor.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_disp.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_graphics.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_keyboard.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_video.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_window.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_client.c.o client/X11/CMakeFiles/xfreerdp-client.dir/cli/xfreerdp.c.o  -o client/X11/xfreerdp -L/usr/local/lib -Wl,-rpath,/usr/ports/net/freerdp/work/.build/client/common:/usr/ports/net/freerdp/work/.build/libfreerdp:/usr/ports/net/freerdp/work/.build/winpr/libwinpr:/usr/local/lib: /usr/local/lib/libX11.so /usr/local/lib/libXinerama.so /usr/local/lib/libXext.so /usr/local/lib/libXcursor.so /usr/local/lib/libXv.so /usr/local/lib/libXi.so /usr/local/lib/libXrender.so /usr/local/lib/libXrandr.so /usr/local/lib/libXfixes.so client/common/libfreerdp-client2.so.2.0.0 libfreerdp/libfreerdp2.so.2.0.0 -lm -lrt winpr/libwinpr/libwinpr2.so.2.0.0 && :
FAILED: client/X11/xfreerdp 
: && /usr/bin/cc -O2 -pipe  -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-unused-command-line-argument -Wno-deprecated-declarations -DWINPR_DLL -O2 -pipe  -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -Wl,-rpath,/usr/local/lib -fstack-protector client/X11/CMakeFiles/xfreerdp-client.dir/xf_gdi.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_gfx.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_rail.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_tsmf.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_input.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_event.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_floatbar.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_channels.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_cliprdr.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_monitor.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_disp.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_graphics.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_keyboard.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_video.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_window.c.o client/X11/CMakeFiles/xfreerdp-client.dir/xf_client.c.o client/X11/CMakeFiles/xfreerdp-client.dir/cli/xfreerdp.c.o  -o client/X11/xfreerdp -L/usr/local/lib -Wl,-rpath,/usr/ports/net/freerdp/work/.build/client/common:/usr/ports/net/freerdp/work/.build/libfreerdp:/usr/ports/net/freerdp/work/.build/winpr/libwinpr:/usr/local/lib: /usr/local/lib/libX11.so /usr/local/lib/libXinerama.so /usr/local/lib/libXext.so /usr/local/lib/libXcursor.so /usr/local/lib/libXv.so /usr/local/lib/libXi.so /usr/local/lib/libXrender.so /usr/local/lib/libXrandr.so /usr/local/lib/libXfixes.so client/common/libfreerdp-client2.so.2.0.0 libfreerdp/libfreerdp2.so.2.0.0 -lm -lrt winpr/libwinpr/libwinpr2.so.2.0.0 && :
libfreerdp/libfreerdp2.so.2.0.0: undefined reference to `SSL_CTX_set_security_level'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Comment 1 Koichiro Iwao freebsd_committer freebsd_triage 2018-12-21 02:22:41 UTC
I have a patch and testing.
Comment 2 Koichiro Iwao freebsd_committer freebsd_triage 2018-12-21 04:15:57 UTC
This need not to be merged into quarterly. r487838 broke the build with libressl but r487838 is not merged into quarterly. quarterly is not broken.
Comment 3 Koichiro Iwao freebsd_committer freebsd_triage 2018-12-21 06:53:43 UTC
Created attachment 200328 [details]
fix-build-with-libressl

Backported upstream patch to fix the build with libressl.
Two commits obrained from: https://github.com/FreeRDP/FreeRDP/issues/5049

Poudriere testbuild result:

PASSED: 12-STABLE + security/libressl 
PASSED: 13-CURRENT + security/libressl

Test with security/libressl-devel is not finished yet.
Comment 4 Kyle Evans freebsd_committer freebsd_triage 2018-12-24 04:46:32 UTC
Comment on attachment 200328 [details]
fix-build-with-libressl

I don't have any libressl test setup, but the patch presented looks good and the upstream commits LGTM.
Comment 5 Ivan Rozhuk 2018-12-24 04:59:58 UTC
With patch builds and work.
Please, also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230963
Comment 6 Koichiro Iwao freebsd_committer freebsd_triage 2018-12-25 01:57:25 UTC
Test finished. Still broken with security/libressl-devel but 2.0.0-rc3 is also broken with libressl-devel. It is another issue and not caused by r487838. Comitting this at this time.
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-12-25 02:16:35 UTC
A commit references this bug:

Author: meta
Date: Tue Dec 25 02:16:18 UTC 2018
New revision: 488290
URL: https://svnweb.freebsd.org/changeset/ports/488290

Log:
  net/freerdp: fix build with security/libressl after updating to 2.0.0-rc4

  Still broken with libressl-devel but it is another issue. Marking as BROKEN.

  PR:		234198
  Submitted by:	myself
  Approved by:	kevans (maintainer), mentors (implicit)
  Obtained from:	https://github.com/FreeRDP/FreeRDP/issues/5049

Changes:
  head/net/freerdp/Makefile
  head/net/freerdp/distinfo
Comment 8 Koichiro Iwao freebsd_committer freebsd_triage 2018-12-25 08:25:30 UTC
Committed, thanks!

Regarding libressl-devel build issue, reported to upstream:
https://github.com/FreeRDP/FreeRDP/issues/5170