pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48980: cad/kicad needs newer GCC, build fails on netbsd-5/i386



>Number:         48980
>Category:       pkg
>Synopsis:       cad/kicad needs newer GCC, build fails on netbsd-5/i386
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 09 20:15:00 +0000 2014
>Originator:     John D. Baker
>Release:        NetBSD/i386-5.2_STABLE, pkgsrc-2014Q2
>Organization:
>Environment:
NetBSD verthandi.technoskunk.fur 5.2_STABLE NetBSD 5.2_STABLE (VERTHANDI) #17: 
Wed May 21 19:01:55 CDT 2014  
sysop%verthandi.technoskunk.fur@localhost:/d0/build/netbsd-5/obj/i386/sys/arch/i386/compile/VERTHANDI
 i386

>Description:
Building "cad/kicad" from pkgsrc-2014Q2 (also in pkgsrc-2014Q1) with
native gcc 4.1.3 in netbsd-5 fails as follows:

[...]
[ 48%] Built target common
[ 48%] Building CXX object 
common/CMakeFiles/pcbcommon.dir/__/pcbnew/legacy_plugin.cpp.o
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/include/common.h: In 
member function 'int PAGE_INFO::GetWidthIU() const':
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/include/common.h:295: 
warning: converting to 'int' from 'double'
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/include/common.h: In 
member function 'int PAGE_INFO::GetHeightIU() const':
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/include/common.h:296: 
warning: converting to 'int' from 'double'
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/include/plot_common.h: In 
member function 'virtual void HPGL_PLOTTER::SetCurrentLineWidth(int)':
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/include/plot_common.h:364:
 warning: converting to 'int' from 'double'
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/pcbnew/legacy_plugin.cpp: 
In member function 'void LEGACY_PLUGIN::loadZONE_CONTAINER()':
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/pcbnew/legacy_plugin.cpp:2282:
 warning: operation on 'data' may be undefined
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/pcbnew/legacy_plugin.cpp: 
In member function 'int LEGACY_PLUGIN::biuSprintf(char*, int) const':
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/pcbnew/legacy_plugin.cpp:2659:
 error: 'fabsl' was not declared in this scope
*** Error code 1

Stop.
make: stopped in /d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214


Prior to this, there were very many warnings of the type
"warning: converting from 'int' to 'double'" or
"warning: passing 'double' for argument N to "rtype func(arg1, ..., argN, ...)"

Adding "cad/kicad" to packages for which "GCC_REQD+=4.6" is used
eliminated the other warnings, but the build still fails with:

[...]
[ 51%] Building CXX object 
common/CMakeFiles/pcbcommon.dir/__/pcbnew/legacy_plugin.cpp.o
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/pcbnew/legacy_plugin.cpp: 
In member function 'int LEGACY_PLUGIN::biuSprintf(char*, LEGACY_PLUGIN::BIU) 
const':
/d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214/pcbnew/legacy_plugin.cpp:2659:44:
 error: 'fabsl' was not declared in this scope
*** Error code 1

Stop.
make: stopped in /d0/build/pkgsrc/cad/kicad/work/kicad-stable-20140214

It seems netbsd-5 "libm" doesn't provide "fabsl()", nor is there a
prototype in "/usr/include/math.h".

As a side note, netbsd-6 does provide "fabsl()", but its synopsis is
missing from "FABS(3)".

I'm certain I'd successfully compiled kicad on netbsd-5/i386 when it
was first imported to pkgsrc-HEAD (pre-pkgsrc-2014Q1?) but I might have
been mistaken (built the version out of "pkgsrc-wip" successfully before
boost-libs problems on netbsd-5).
>How-To-Repeat:
Attempt to build "cad/kicad" from pkgsrc-2014Q2 on netbsd-5/i386 with
native gcc.

Add something like:

  .if "${PKGPATH}" == "cad/kicad"
    GCC_REQD+=4.5   # or later
  .endif

to "/etc/mk.conf", make clean and retry the build.
>Fix:
Hack a local "fabsl()"?



Home | Main Index | Thread Index | Old Index