Subject: pkg/31486: security/heimdal fails to build on Solaris 10 due to missing vis.h header
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 10/06/2005 08:14:00
>Number:         31486
>Category:       pkg
>Synopsis:       security/heimdal fails to build on Solaris 10 due to missing vis.h header
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 06 08:14:00 +0000 2005
>Originator:     segv
SunOS 5.10 Generic sun4u sparc SUNW,Ultra-5_10
When building security/heimdal package with sunpro compilers, during configure stage, the configure scripts checks for presence of vis.h file. I think in this context, it's looking for vis.h file that contains prototypes for functions that visually encode characters. Solaris does not seem to have vis(), strvis(), etc functions, however it has a totally different vis.h file, which is used for VIS instruction set on sparc architecture.

The result, configure script incorrectly assumes that the required vis.h file is present and leaves it at that. Later on, the package fails to build with the following error:

cc -DHAVE_CONFIG_H -I. -I../../include -I../../lib/roken -I/opt/pkg32-2005Q3-sunpro.obj/security/heimdal/work/.buildlink/include/readline -I/opt/pkg32-2005Q3-sunpro.obj/security/heimdal/work/.buildlink/include -I/opt/pkg32-2005Q3-sunpro.obj/security/heimdal/work/.buildlink/include/db4 -O -xO3 -xtarget=native -c unvis.c  -KPIC -DPIC -o .libs/unvis.o
cc: Warning: -xarch=native has been explicitly specified, or implicitly specified by a macro option, -xarch=native on this architecture implies -xarch=v8plusa which generates code that does not run on pre UltraSPARC processors
"unvis.c", line 100: undefined symbol: UNVIS_END
"unvis.c", line 103: undefined symbol: UNVIS_VALID
"unvis.c", line 105: undefined symbol: UNVIS_NOCHAR
"unvis.c", line 105: undefined symbol: UNVIS_SYNBAD
"unvis.c", line 117: undefined symbol: UNVIS_VALID
"unvis.c", line 178: undefined symbol: UNVIS_NOCHAR
"unvis.c", line 187: undefined symbol: UNVIS_SYNBAD
"unvis.c", line 226: undefined symbol: UNVIS_VALIDPUSH
"unvis.c", line 270: undefined symbol: UNVIS_VALID
"unvis.c", line 270: non-constant case expression
"unvis.c", line 273: undefined symbol: UNVIS_VALIDPUSH
"unvis.c", line 273: non-constant case expression
"unvis.c", line 277: undefined symbol: UNVIS_NOCHAR
"unvis.c", line 277: non-constant case expression
"unvis.c", line 283: undefined symbol: UNVIS_END
"unvis.c", line 283: undefined symbol: UNVIS_VALID
cc: acomp failed for unvis.c
*** Error code 1

bmake: stopped in /opt/pkg32-2005Q3-sunpro.obj/security/heimdal/work/heimdal-0.6.5/lib/roken
*** Error code 1


I guess the real fix is to make configure not just test for presence of vis.h file, but also test for certain macros cotained in that file, to make sure it is the correct file.

The quick/manual fix would be: after you get 'undefined symbol' errors

cd security/heimdal/work/heimdal-0.6.5/lib/roken
cp vis.hin vis.h

and then restart build process.