Bug 220591 - graphics/graphviz: fails to build on armv6 (451 ports skipped)
Summary: graphics/graphviz: fails to build on armv6 (451 ports skipped)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2017-07-10 06:12 UTC by Jan Beich
Modified: 2017-08-02 17:38 UTC (History)
3 users (show)

See Also:
dinoex: maintainer-feedback+


Attachments
patch-lib-common-shapes.c (205 bytes, text/plain)
2017-07-10 09:10 UTC, Dirk Meyer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-07-10 06:12:00 UTC
./../lib/gvc/.libs/libgvc.so: undefined reference to `sincos'
cc: error: linker command failed with exit code 1 (use -v to see invocation)

https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20170703/498271.html
Comment 1 Dirk Meyer freebsd_committer freebsd_triage 2017-07-10 09:10:35 UTC
Created attachment 184219 [details]
patch-lib-common-shapes.c

patch for sincos
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2017-07-10 09:11:39 UTC
Please try the attached patch
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-07-10 12:22:50 UTC
Comment on attachment 184219 [details]
patch-lib-common-shapes.c

Doesn't help:

  $ make
  checking for sincos... no
  [...]
  ../../lib/gvc/.libs/libgvc.so: undefined reference to `sincos'
  cc: error: linker command failed with exit code 1 (use -v to see invocation)
  [...]
  ../../plugin/neato_layout/.libs/libgvplugin_neato_layout.so: undefined reference to `sincos'
  cc: error: linker command failed with exit code 1 (use -v to see invocation)

I've also tried adding

  # Bug 220590: -ffast-math is broken without sincos in libm
  CFLAGS_armv6=	-fno-unsafe-math-optimizations

but it doesn't help due to the order of CFLAGS on command line.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2017-07-10 14:19:05 UTC
You can add CFLAGS+= -fno-builtin-sincos -fno-builtin-sin -fno-builtin-cos -fno-builtin-sincosf -fno-builtin-sinf -fno-builtin-cosf -fno-builtin-sincosl -fno-builtin-sinl -fno-builtin-cosl

or ask mmel@ to mfc base r319047
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2017-07-10 14:20:31 UTC
We build package for 11.0 on armv6 now?
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-07-11 08:29:13 UTC
A commit references this bug:

Author: dinoex
Date: Tue Jul 11 08:28:44 UTC 2017
New revision: 445473
URL: https://svnweb.freebsd.org/changeset/ports/445473

Log:
  - fix build on armv6
  PR:		220591
  Submitted by:	Mikael Urankar

Changes:
  head/graphics/graphviz/Makefile
Comment 7 Mikael Urankar freebsd_committer freebsd_triage 2017-07-11 13:37:52 UTC
The CFLAGS must be set globally (in make.conf), a lot of multimedia and graphics ports are affected by this issue (on 11.0 and 11.1 at least), 12-CURRENT is not affected.

I don't think it's a good idea to pollute every ports with this cflags.