Bug 144138 - failure in building x11-toolkits/xview
failure in building x11-toolkits/xview
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: FreeBSD ports mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-20 14:20 UTC by turutani
Modified: 2010-04-07 09:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description turutani 2010-02-20 14:20:02 UTC
	failure in building x11-toolkits/xview.

Fix: 

I am setting CFLAGS in /etc/make.conf, in order to avoid trouble arround
	"-O2" optimization.
	This setting causes trouble, for removing makes it buildable.
	I think CFLAGS in make.conf overwrite CFLAGS settings in Makefile when
	make traverses to the sub directory.
	I do not know how to fix it.
How-To-Repeat: 	% cd /usr/ports/x11-toolkits/xview
	% make
	...
	cc -fPIC   -O -pipe     -I../../../build/include  -I/usr/local/include    -DCSRG_BASED -I/include -DSUNOS41 -DX11R6 -DFUNCPROTO=15 -DNARROWPROTO   -DOS_HAS_LOCALE -DOS_HAS_MMAP   -DEXTRASMENU="\"/usr/local/lib/.text_extras_menu\""      -I../../../build/include  -I/usr/local/include    -DCSRG_BASED -I/include -DSUNOS41 -DX11R6 -DFUNCPROTO=15 -DNARROWPROTO   -DOS_HAS_LOCALE -DOS_HAS_MMAP   -DEXTRASMENU="\"/usr/local/lib/.text_extras_menu\""   -c ev_display.c  -o shared/ev_display.o
	In file included from ../../../build/include/xview_private/tty_impl.h:216,
	                 from ev_display.c:36:
	/usr/include/sys/ioctl_compat.h:42:2: error: #error "Definitions not available without TTY ioctl compat."
	ev_display.c: In function 'ev_init_X_carets':
	ev_display.c:89: warning: passing argument 1 of 'xv_error' makes integer from pointer without a cast
	ev_display.c: In function 'ev_put_caret':
	ev_display.c:138: warning: passing argument 1 of 'xv_error' makes integer from pointer without a cast
	*** Error code 1

	Stop in /usr/local/work/usr/ports/x11-toolkits/xview/work/xview3.2p1-X11R6/lib/libxview/textsw.
	*** Error code 1

	Stop in /usr/local/work/usr/ports/x11-toolkits/xview/work/xview3.2p1-X11R6/lib/libxview.
	*** Error code 1

	Stop in /usr/local/work/usr/ports/x11-toolkits/xview/work/xview3.2p1-X11R6/lib.
	*** Error code 1

	Stop in /usr/local/work/usr/ports/x11-toolkits/xview/work/xview3.2p1-X11R6.
	*** Error code 1

	Stop in /usr/local/work/usr/ports/x11-toolkits/xview/work/xview3.2p1-X11R6.
	*** Error code 1

	Stop in /usr/ports/x11-toolkits/xview.
Comment 1 pav freebsd_committer 2010-03-31 13:58:21 UTC
State Changed
From-To: open->closed

Fixed by miwi in r1.52 on 2009/08/06
Comment 2 turutani 2010-04-02 08:30:36 UTC
> Fixed by miwi in r1.52 on 2009/08/06

No, this is not sufficient.
Would you kindly try adding CFLAGS in /etc/make.conf ?
For example,
CFLAGS= -O -pipe

Building xview calls many sub make, hence it cannot be built
in this case.
Addition of CFLAGS is allowed, as I think.
Comment 3 pav freebsd_committer 2010-04-02 10:11:54 UTC
Hmm true. Do you have a patch to fix?

Tsurutani Naoki pí¹e v pá 02. 04. 2010 v 16:30 +0900:
> > Fixed by miwi in r1.52 on 2009/08/06
> 
> No, this is not sufficient.
> Would you kindly try adding CFLAGS in /etc/make.conf ?
> For example,
> CFLAGS= -O -pipe
> 
> Building xview calls many sub make, hence it cannot be built
> in this case.
> Addition of CFLAGS is allowed, as I think.
> 


-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

It's the classic Microsoft security-bulletin formula: "The vulnerability
is important (never dangerous); you have nothing to fear and no reason
to regret trusting us; we have no intention of apologizing for it or
even explaining it adequately; now go get your patch, shut up, and be
grateful nothing bad has happened.
  -- The Register
Comment 4 turutani 2010-04-02 10:37:43 UTC
No.
I struggled for several hours with this, but I couldn't fix it...
Comment 5 turutani 2010-04-07 03:14:27 UTC
Here is a patch (something ad-hoc...):
--- xview/Makefile.orig	2009-08-07 06:00:08.000000000 +0900
+++ xview/Makefile	2010-04-07 11:06:12.000000000 +0900
@@ -28,7 +28,7 @@
 USE_IMAKE=	yes
 USE_XORG=	x11
 USE_LDCONFIG=	yes
-IMAKEINCLUDE=	"-I${LOCALBASE}/lib/X11/config -I${WRKSRC}/config"
+IMAKEINCLUDE=	"-I${WRKSRC}/config -I${LOCALBASE}/lib/X11/config"
 MAKE_ENV+=	IMAKEINCLUDE=${IMAKEINCLUDE}
 ALL_TARGET=	World
 SUB_FILES=	pkg-message
@@ -49,6 +49,10 @@
 	  ${WRKSRC}/config/XView.cf
 	@${REINPLACE_CMD} -e "s,CcCmd cc,CcCmd ${CC}," \
 	  ${WRKSRC}/config/XView.tmpl
+.if ${OSVERSION} < 800090
+	@${REINPLACE_CMD} -e "s/-DCOMPAT_43TTY//" \
+	  ${WRKSRC}/config/XView.tmpl
+.endif
 	@${REINPLACE_CMD} -e 's+/usr/X11/+${LOCALBASE}/+g;' \
 	  ${WRKSRC}/clients/olwm/screen.c
 	${REINPLACE_CMD} -e 's+/usr/lib+${PREFIX}/lib+'	\
--- xview/files/patch-config+XView.tmpl.orig	2003-12-14 08:38:20.000000000 +0900
+++ xview/files/patch-config+XView.tmpl	2010-04-07 10:39:10.000000000 +0900
@@ -1,6 +1,6 @@
---- config/XView.tmpl.orig	Mon Sep 29 00:02:17 2003
-+++ config/XView.tmpl	Mon Sep 29 00:02:17 2003
-@@ -96,7 +96,7 @@
+--- config/XView.tmpl.orig	2010-04-07 10:28:25.000000000 +0900
++++ config/XView.tmpl	2010-04-07 10:35:36.000000000 +0900
+@@ -96,11 +96,13 @@
   *      Work around small conflict with Project.tmpl file
   */
  #if UseInstalled
@@ -9,7 +9,14 @@
  #endif
  
  #if OsHasLocale
-@@ -192,14 +192,6 @@
+-         LOCALE_DEFINES = -DOS_HAS_LOCALE
++         LOCALE_DEFINES = -DOS_HAS_LOCALE -DCOMPAT_43TTY
++#else
++         LOCALE_DEFINES = -DCOMPAT_43TTY
+ #endif
+ 
+ #if OsHasMmap
+@@ -192,14 +194,6 @@
                       AS = as
   */
  /*
@@ -24,7 +31,7 @@
   *	Temporary directory used during build process before the include
   *	files are installed.  This is just a place where symbolic links are
   *	placed to point back to the actual files in the build hierarchy to
-@@ -224,7 +216,7 @@
+@@ -224,7 +218,7 @@
   *	afterwards.
   */
  #ifndef XVIncludeDirName
@@ -33,7 +40,7 @@
  #endif
                   INCDIR = XVIncludeDirName
  /*
-@@ -356,10 +348,10 @@
+@@ -356,10 +350,10 @@
  
  #if SystemV4
               SYSV_CLIENT_LIB = -lintl -ldl
@@ -46,7 +53,7 @@
  #endif
  
  /*
-@@ -371,16 +363,16 @@
+@@ -371,16 +365,16 @@
   */
  
  #if XvI18nLevel == 4
@@ -70,7 +77,7 @@
  
  /*
   *	Define libraries for XView clients
-@@ -410,7 +402,7 @@
+@@ -410,7 +404,7 @@
   */
  #if SharedLibXView
  # ifndef SharedXViewRev
@@ -79,7 +86,7 @@
  # define SharedXViewRev 3
  #else
  # define SharedXViewRev 3.2
-@@ -449,12 +441,8 @@
+@@ -449,12 +443,8 @@
   *	Include the XView specific makefile macros.
   */
  
----
IMAKEINCLUDE order should be fixed, to build on the host xview installed.
Comment 6 dfilter freebsd_committer 2010-04-07 09:34:35 UTC
pav         2010-04-07 08:34:21 UTC

  FreeBSD ports repository

  Modified files:
    x11-toolkits/xview   Makefile 
    x11-toolkits/xview/files patch-config+XView.tmpl 
  Log:
  - Fix build when custom CFLAGS are set in make.conf
  
  PR:             ports/144138
  Submitted by:   Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp>
  
  Revision  Changes    Path
  1.54      +5 -1      ports/x11-toolkits/xview/Makefile
  1.2       +16 -9     ports/x11-toolkits/xview/files/patch-config+XView.tmpl
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 pav freebsd_committer 2010-04-07 09:34:42 UTC
This works for me - committed, thanks!

Tsurutani Naoki pí¹e v st 07. 04. 2010 v 11:14 +0900:
> Here is a patch (something ad-hoc...):
> --- xview/Makefile.orig	2009-08-07 06:00:08.000000000 +0900
> +++ xview/Makefile	2010-04-07 11:06:12.000000000 +0900
> @@ -28,7 +28,7 @@
>  USE_IMAKE=	yes
>  USE_XORG=	x11
>  USE_LDCONFIG=	yes
> -IMAKEINCLUDE=	"-I${LOCALBASE}/lib/X11/config -I${WRKSRC}/config"
> +IMAKEINCLUDE=	"-I${WRKSRC}/config -I${LOCALBASE}/lib/X11/config"
>  MAKE_ENV+=	IMAKEINCLUDE=${IMAKEINCLUDE}
>  ALL_TARGET=	World
>  SUB_FILES=	pkg-message
> @@ -49,6 +49,10 @@
>  	  ${WRKSRC}/config/XView.cf
>  	@${REINPLACE_CMD} -e "s,CcCmd cc,CcCmd ${CC}," \
>  	  ${WRKSRC}/config/XView.tmpl
> +.if ${OSVERSION} < 800090
> +	@${REINPLACE_CMD} -e "s/-DCOMPAT_43TTY//" \
> +	  ${WRKSRC}/config/XView.tmpl
> +.endif
>  	@${REINPLACE_CMD} -e 's+/usr/X11/+${LOCALBASE}/+g;' \
>  	  ${WRKSRC}/clients/olwm/screen.c
>  	${REINPLACE_CMD} -e 's+/usr/lib+${PREFIX}/lib+'	\
> --- xview/files/patch-config+XView.tmpl.orig	2003-12-14 08:38:20.000000000 +0900
> +++ xview/files/patch-config+XView.tmpl	2010-04-07 10:39:10.000000000 +0900
> @@ -1,6 +1,6 @@
> ---- config/XView.tmpl.orig	Mon Sep 29 00:02:17 2003
> -+++ config/XView.tmpl	Mon Sep 29 00:02:17 2003
> -@@ -96,7 +96,7 @@
> +--- config/XView.tmpl.orig	2010-04-07 10:28:25.000000000 +0900
> ++++ config/XView.tmpl	2010-04-07 10:35:36.000000000 +0900
> +@@ -96,11 +96,13 @@
>    *      Work around small conflict with Project.tmpl file
>    */
>   #if UseInstalled
> @@ -9,7 +9,14 @@
>   #endif
>   
>   #if OsHasLocale
> -@@ -192,14 +192,6 @@
> +-         LOCALE_DEFINES = -DOS_HAS_LOCALE
> ++         LOCALE_DEFINES = -DOS_HAS_LOCALE -DCOMPAT_43TTY
> ++#else
> ++         LOCALE_DEFINES = -DCOMPAT_43TTY
> + #endif
> + 
> + #if OsHasMmap
> +@@ -192,14 +194,6 @@
>                        AS = as
>    */
>   /*
> @@ -24,7 +31,7 @@
>    *	Temporary directory used during build process before the include
>    *	files are installed.  This is just a place where symbolic links are
>    *	placed to point back to the actual files in the build hierarchy to
> -@@ -224,7 +216,7 @@
> +@@ -224,7 +218,7 @@
>    *	afterwards.
>    */
>   #ifndef XVIncludeDirName
> @@ -33,7 +40,7 @@
>   #endif
>                    INCDIR = XVIncludeDirName
>   /*
> -@@ -356,10 +348,10 @@
> +@@ -356,10 +350,10 @@
>   
>   #if SystemV4
>                SYSV_CLIENT_LIB = -lintl -ldl
> @@ -46,7 +53,7 @@
>   #endif
>   
>   /*
> -@@ -371,16 +363,16 @@
> +@@ -371,16 +365,16 @@
>    */
>   
>   #if XvI18nLevel == 4
> @@ -70,7 +77,7 @@
>   
>   /*
>    *	Define libraries for XView clients
> -@@ -410,7 +402,7 @@
> +@@ -410,7 +404,7 @@
>    */
>   #if SharedLibXView
>   # ifndef SharedXViewRev
> @@ -79,7 +86,7 @@
>   # define SharedXViewRev 3
>   #else
>   # define SharedXViewRev 3.2
> -@@ -449,12 +441,8 @@
> +@@ -449,12 +443,8 @@
>    *	Include the XView specific makefile macros.
>    */
>   
> ----
> IMAKEINCLUDE order should be fixed, to build on the host xview installed.
> 


-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

On real UNIX, /usr/bin/more prints -More-.