Bug 196576 - [patch] graphics/svgalib build broken with WITH_DEBUG=YES
Summary: [patch] graphics/svgalib build broken with WITH_DEBUG=YES
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: Niclas Zeising
Depends on:
Reported: 2015-01-06 22:04 UTC by Michael Zhilin
Modified: 2018-08-27 02:36 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (zeising)

svn patch (934 bytes, patch)
2015-01-06 22:04 UTC, Michael Zhilin
no flags Details | Diff
poudriere log (208.98 KB, text/plain)
2015-01-06 22:05 UTC, Michael Zhilin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Zhilin freebsd_committer 2015-01-06 22:04:45 UTC
Created attachment 151431 [details]
svn patch


In case of WITH_DEBUG=YES, graphics/svgalib build is broken using clang (at least under FreeBSD 10.1). The root cause is different behaviour of "inline" in GNU89 & C99: http://clang.llvm.org/compatibility.html#inline. As quick fix, the attached patch adds "static" for inline function outb. 

The issue is reproduced only if cc doesn't do optimization like removal of inline function. If you define WITH_DEBUG as yes, cc will use -O0 instead of -O2. 

Please find attached patch to fix this issue. Patch is verified by poudriere, log is attached.
Comment 1 Bugzilla Automation freebsd_committer 2015-01-06 22:04:45 UTC
Auto-assigned to maintainer zeising@FreeBSD.org
Comment 2 Michael Zhilin freebsd_committer 2015-01-06 22:05:34 UTC
Created attachment 151432 [details]
poudriere log
Comment 3 Sean Bruno freebsd_committer 2015-07-15 14:56:28 UTC
This is still a valid failure case and fix.  I'll commit this if the maintainer doesn't have time for it:

gmake[2]: Entering directory '/wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils'
cc -I/wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/include -I. -MM /wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils/restorefont.c /wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils/convfont.c /wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils/restoretextmode.c /wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils/restorepalette.c /wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils/dumpreg.c /wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils/fix132x43.c /wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils/setmclk.c >.depend
cc -Wall -Wstrict-prototypes -Wall -Wstrict-prototypes -fPIC -I/wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/include -I. -pipe  -g -fstack-protector -fno-strict-aliasing  -I../include -c -o restorefont.o restorefont.c
cc -Wall -Wstrict-prototypes -Wall -Wstrict-prototypes -fPIC -I/wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/include -I. -pipe  -g -fstack-protector -fno-strict-aliasing  -I../include -L../sharedlib -o restorefont restorefont.o -lvga -lm
../sharedlib/libvga.so: undefined reference to `_outb'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
/wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils/Makefile:34: recipe for target 'restorefont' failed
gmake[2]: *** [restorefont] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3/utils'
Makefile:423: recipe for target 'textutils' failed
gmake[1]: *** [textutils] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/svgalib/work/svgalib-1.4.3'
*** Error code 2
Comment 4 Niclas Zeising freebsd_committer 2015-07-16 05:25:59 UTC
Looking good to me.
Consider this maintainer approval to commit this.
I'll try to get to it this evening otherwise.
Comment 5 commit-hook freebsd_committer 2015-07-16 21:30:28 UTC
A commit references this bug:

Author: zeising
Date: Thu Jul 16 21:29:36 UTC 2015
New revision: 392325
URL: https://svnweb.freebsd.org/changeset/ports/392325

  Break build when WITH_DEBUG= is set

  PR:		196576
  Submitted by:	mizhka@gmail.com

Comment 6 commit-hook freebsd_committer 2018-08-27 02:36:36 UTC
A commit references this bug:

Author: acm
Date: Mon Aug 27 02:36:05 UTC 2018
New revision: 478173
URL: https://svnweb.freebsd.org/changeset/ports/478173


  PR:		196576
  Submitted by:	emaste, darkfiberiru at gmail.com