Bug 213864 - graphics/graphviz fails to build on arm64 (no sbrk)
Summary: graphics/graphviz fails to build on arm64 (no sbrk)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks: 201763
  Show dependency treegraph
 
Reported: 2016-10-28 18:40 UTC by Glen Barber
Modified: 2017-01-11 14:33 UTC (History)
6 users (show)

See Also:
dinoex: maintainer-feedback+


Attachments
Patch to use the system malloc on arm64 (1.41 KB, patch)
2016-11-07 11:39 UTC, Andrew Turner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Glen Barber freebsd_committer 2016-10-28 18:40:55 UTC
/bin/sh ../../libtool  --tag=CC   --mode=link cc  -O2 -pipe  -DLIBICONV_PLUG -fno-strict-aliasing -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math  -L/usr/local/lib -lpthread -L/usr/local/lib -o gvpr gvpr-gvprmain.o ../../lib/gvpr/libgvpr.la
libtool: link: cc -O2 -pipe -DLIBICONV_PLUG -fno-strict-aliasing -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math -o .libs/gvpr gvpr-gvprmain.o  -L/usr/local/lib ../../lib/gvpr/.libs/libgvpr.so /wrkdirs/usr/ports/graphics/graphviz/work/graphviz-2.38.0/lib/cgraph/.libs/libcgraph.so /wrkdirs/usr/ports/graphics/graphviz/work/graphviz-2.38.0/lib/cdt/.libs/libcdt.so -lm -lpthread -Wl,-rpath -Wl,/usr/local/lib/graphviz
../../lib/gvpr/.libs/libgvpr.so: undefined reference to `sbrk'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[5]: *** [Makefile:677: gvpr] Error 1
gmake[5]: Leaving directory '/wrkdirs/usr/ports/graphics/graphviz/work/graphviz-2.38.0/cmd/gvpr'
gmake[4]: *** [Makefile:817: all-recursive] Error 1
gmake[4]: Leaving directory '/wrkdirs/usr/ports/graphics/graphviz/work/graphviz-2.38.0/cmd/gvpr'
gmake[3]: *** [Makefile:531: all-recursive] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/graphics/graphviz/work/graphviz-2.38.0/cmd'
gmake[2]: *** [Makefile:774: all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/graphics/graphviz/work/graphviz-2.38.0'
gmake[1]: *** [Makefile:583: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/graphviz/work/graphviz-2.38.0'
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/graphviz
Comment 1 commit-hook freebsd_committer 2016-11-06 15:51:10 UTC
A commit references this bug:

Author: dinoex
Date: Sun Nov  6 15:50:26 UTC 2016
New revision: 425500
URL: https://svnweb.freebsd.org/changeset/ports/425500

Log:
  - disable build on arm
  PR:		213864

Changes:
  head/graphics/graphviz/Makefile
Comment 2 Dirk Meyer freebsd_committer 2016-11-06 15:52:05 UTC
Sorry no easy way to fix that.
Comment 3 Ed Maste freebsd_committer 2016-11-06 16:37:24 UTC
The failure is on arm64, not arm, so at a minimum the ONLY_FOR_ARCHS= has to be adjusted.
Comment 4 commit-hook freebsd_committer 2016-11-06 18:18:31 UTC
A commit references this bug:

Author: dinoex
Date: Sun Nov  6 18:17:30 UTC 2016
New revision: 425575
URL: https://svnweb.freebsd.org/changeset/ports/425575

Log:
  - use ONLY_FOR_ARCHS
  PR:		213864

Changes:
  head/graphics/graphviz/Makefile
Comment 5 Dirk Meyer freebsd_committer 2016-11-06 18:19:06 UTC
Restricted to known builds.
Comment 6 Andrew Turner freebsd_committer 2016-11-07 11:39:01 UTC
Created attachment 176716 [details]
Patch to use the system malloc on arm64
Comment 7 Andrew Turner freebsd_committer 2016-11-07 11:39:57 UTC
With the attached patch I can build graphviz on arm64 under Poudriere.
Comment 8 Alexey Dokuchaev freebsd_committer 2016-11-08 05:59:51 UTC
It also builds fine (without patches) on PowerPC.  ONLY_FOR_ARCHS was tocally uncalled here, please reconsider it Dirk.
Comment 9 commit-hook freebsd_committer 2016-11-13 23:53:40 UTC
A commit references this bug:

Author: dinoex
Date: Sun Nov 13 23:53:08 UTC 2016
New revision: 426075
URL: https://svnweb.freebsd.org/changeset/ports/426075

Log:
  - fix build on aarch64
  PR:		213864
  Submitted by:	Andrew Turner

Changes:
  head/graphics/graphviz/Makefile
  head/graphics/graphviz/files/patch-lib-vmalloc-vmhdr.h
Comment 10 Dirk Meyer freebsd_committer 2016-11-13 23:57:33 UTC
(In reply to Alexey Dokuchaev from comment #8)

For which of the several PowerPC platforms can you check?
Comment 11 Alexey Dokuchaev freebsd_committer 2016-11-14 00:32:23 UTC
I've checked it on 32-bit FreeBSD/powerpc running on Apple Mac mini G4.
Comment 12 Jia-Shiun Li 2016-11-16 14:57:11 UTC
I've been using graphviz on RPI2 for some time. So it is surprising to find it not listed in list of supported platforms when updating it from ports today.

armv6 should be added to the list. Or, with the appropriate patch for aarch64 added, is ONLY_FOR_ARCHS still needed?
Comment 13 Alexey Dokuchaev freebsd_committer 2016-11-17 09:14:50 UTC
Also, another gentle reminder that PowerPC is still wrongly discriminated.

On a larger scale, entire choice of ONLY_FOR_ARCHS seems bogus to me.  There is nothing that prevents this piece of software from working everywhere; it is not tied to a specific CPU or architecture.  It might not build and work everywhere for the moment, but that what BROKEN is precisely for.  ONLY_FOR_ARCHS is like, "it won't ever work there so don't bother even trying."  :-(

Dirk?
Comment 14 Dirk Meyer freebsd_committer 2016-12-08 20:49:47 UTC
The valid combinations when ARCH and MARCH differs are not documented enough.

That makes the exclusion of broken builds a gamble.

Please provide a verified tuple if it builds.
Comment 15 Ed Maste freebsd_committer 2016-12-08 20:51:43 UTC
After r426075 I believe it should build on all architectures.
Comment 16 Alexey Dokuchaev freebsd_committer 2016-12-09 08:26:54 UTC
That said, can we now please remove this ONLY_FOR_ARCHS nonsense?
Comment 17 mikael.urankar 2017-01-09 12:47:13 UTC
It builds fine on armv6, can we remove ONLY_FOR_ARCHS please ?
Comment 18 Alexey Dokuchaev freebsd_committer 2017-01-11 14:33:53 UTC
I believe it was finally removed last week in ports r430598 as part of the update to version 2.40.1.