Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405475 - media-gfx/xfig-3.2.5b-r2 - e_edit.c:4252:7: error: ‘XtNinternational’ undeclared (first use in this function)
Summary: media-gfx/xfig-3.2.5b-r2 - e_edit.c:4252:7: error: ‘XtNinternational’ undecla...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: http://lists.freebsd.org/pipermail/fr...
Whiteboard:
Keywords:
: 408293 413707 421035 426780 (view as bug list)
Depends on:
Blocks: 472340
  Show dependency tree
 
Reported: 2012-02-23 19:39 UTC by Sebastian Schubert
Modified: 2013-06-05 14:04 UTC (History)
24 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emergeinfo,16.75 KB, text/plain)
2012-02-23 19:39 UTC, Sebastian Schubert
Details
build log (build.log,15.26 KB, text/plain)
2012-02-24 07:30 UTC, Sebastian Schubert
Details
media-gfx/xfig-3.2.5b-r2 DEPEND <x11-libs/libXaw3d-1.6 (xfig.patch,295 bytes, patch)
2012-05-18 22:17 UTC, Peter Stuge
Details | Diff
fix with libXaw3d-1.6.2 (xfig-3.2.5b-xaw-internationalization.patch,398 bytes, patch)
2012-06-04 21:52 UTC, Dylan Simon
Details | Diff
Add IUSE=nls to xfig-3.2.5b-r2.ebuild (xfig-3.2.5b-r2.iuse-nls.patch,1.04 KB, patch)
2013-02-08 18:59 UTC, Peter Stuge
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Schubert 2012-02-23 19:39:09 UTC
I try to emerge xfig. It does not compile (even with MAKEOPTS="-j1"). The error: 

e_edit.c: In function ‘generic_window’:
e_edit.c:3214:56: warning: cast from pointer to integer of different size
e_edit.c: In function ‘spline_point_window’:
e_edit.c:3601:47: warning: cast to pointer from integer of different size
e_edit.c: In function ‘toggle_sfactor_type’:
e_edit.c:3611:35: warning: cast from pointer to integer of different size
e_edit.c: In function ‘scroll_sfactor_value’:
e_edit.c:3635:24: warning: cast from pointer to integer of different size
e_edit.c: In function ‘color_selection_panel’:
e_edit.c:4060:23: warning: cast to pointer from integer of different size
e_edit.c: In function ‘str_panel’:
e_edit.c:4252:7: error: ‘XtNinternational’ undeclared (first use in this function)
e_edit.c:4252:7: note: each undeclared identifier is reported only once for each function it appears in
e_edit.c: In function ‘unit_select’:
e_edit.c:4661:24: warning: cast from pointer to integer of different size
e_edit.c: In function ‘arc_type_select’:
e_edit.c:4742:29: warning: cast from pointer to integer of different size
e_edit.c: In function ‘pen_color_select’:
e_edit.c:4868:17: warning: cast from pointer to integer of different size
e_edit.c: In function ‘fill_color_select’:
e_edit.c:4878:18: warning: cast from pointer to integer of different size
e_edit.c: In function ‘hidden_text_select’:
e_edit.c:4930:24: warning: cast from pointer to integer of different size
e_edit.c: In function ‘rigid_text_select’:
e_edit.c:4938:23: warning: cast from pointer to integer of different size
e_edit.c: In function ‘special_text_select’:
e_edit.c:4946:25: warning: cast from pointer to integer of different size
e_edit.c: In function ‘textjust_select’:
e_edit.c:4954:16: warning: cast from pointer to integer of different size
e_edit.c: In function ‘flip_pic_select’:
e_edit.c:4966:21: warning: cast from pointer to integer of different size
e_edit.c: In function ‘rotation_select’:
e_edit.c:4999:16: warning: cast from pointer to integer of different size
e_edit.c: In function ‘fill_style_select’:
e_edit.c:5107:17: warning: cast from pointer to integer of different size
make: *** [e_edit.o] Error 1
emake failed
 * ERROR: media-gfx/xfig-3.2.5b-r2 failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  85:  Called src_compile
 *   environment, line 2151:  Called die
 * The specific snippet of code:
 *       emake CC="$(tc-getCC)" LOCAL_LDFLAGS="${LDFLAGS}" CDEBUGFLAGS="${CFLAGS}" USRLIBDIR=/usr/$(get_libdir) || die
 * 

The link given above might give a solution.


Reproducible: Always
Comment 1 Sebastian Schubert 2012-02-23 19:39:42 UTC
Created attachment 303005 [details]
emerge --info
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-24 05:04:30 UTC
Please attach the entire build log to this bug report.
Comment 3 Sebastian Schubert 2012-02-24 07:30:54 UTC
Created attachment 303023 [details]
build log

build log. My system (amd64 testing) should be up-to-date. I also re-compiled x11-libs/libXaw3d and x11-libs/libXaw, just to be sure.
Comment 4 Luis Carrera 2012-03-06 00:47:37 UTC
I got the same problem with de ~amd64 branch.

Trying to play (and maybe help?), i comment the lines inside the #ifdef that include the line which gives the error, I try "make", and get an error from libXaw3d.

The version of libXaw3d is x11-libs/libXaw3d-1.6.1-r1

Then I masked the version:

echo ">x11-libs/libXaw3d-1.5-r1" >> package.mask

so i get the old version of libXaw3d; emerge again xfig 3.2.5b-r2, and works fine. 

So, I would say that maybe the problem is with libXaw3d?
Comment 5 hirakendu 2012-04-07 22:30:21 UTC
Thanks for the tip about libXaw3d. Downgrading it to 1.5 works here for now.
Comment 6 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-04-28 19:48:59 UTC
*** Bug 413707 has been marked as a duplicate of this bug. ***
Comment 7 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-04-28 19:50:16 UTC
*** Bug 408293 has been marked as a duplicate of this bug. ***
Comment 8 Juergen Rose 2012-04-30 16:00:00 UTC
If I mask >=x11-libs/libXaw3d-1.6.2 , then Bug 413707 (https://bugs.gentoo.org/show_bug.cgi?id=413707) disappears.
Comment 9 Peter Stuge 2012-05-18 22:17:41 UTC
Created attachment 312227 [details, diff]
media-gfx/xfig-3.2.5b-r2 DEPEND <x11-libs/libXaw3d-1.6
Comment 10 Peter Stuge 2012-05-18 22:18:38 UTC
So I just added a patch for xfig-3.2.5b-r2 to make it DEPEND on <x11-libs/libXaw3d-1.6 which I hope fixes this bug?
Comment 11 Peter Stuge 2012-05-19 04:15:36 UTC
I see that app-text/gv-3.7.3-r1 DEPENDs on >=x11-libs/libXaw3d-1.6-r1 so my patch is perhaps not ideal since it creates a block..
Comment 12 Dylan Simon 2012-06-04 21:52:20 UTC
Created attachment 314233 [details, diff]
fix with libXaw3d-1.6.2

This patch fixes the build and seem to work when building with libXaw3d-1.6.2.  Note that it may need a libXaw3d[unicode] requirement, though it should be a noop with libXaw3d-1.5.
Comment 13 Peter Stuge 2012-06-05 00:14:39 UTC
(In reply to comment #12)
> This patch fixes the build and seem to work when building with
> libXaw3d-1.6.2.  Note that it may need a libXaw3d[unicode] requirement,

Thanks! So what's the right way to fix the ebuild? Use sed to modify Imakefile according to USE=nls or unicode?
Comment 14 Dylan Simon 2012-06-05 01:35:00 UTC
(In reply to comment #13)
> Thanks! So what's the right way to fix the ebuild? Use sed to modify
> Imakefile according to USE=nls or unicode?

Put the attached patch in files/xfig-3.2.5b-xaw-internationalization.patch and add
> epatch "${FILESDIR}/${P}-xaw-internationalization.patch" #405475
to the ebuild.  Should be enough to get you by, but the proper RDEPEND should probably be something like "|| ( <x11-libs/libXaw3d-1.6 >=x11-libs/libXaw3d-1.6[unicode] )".  A better patch might be able to make the unicode part optional.
Comment 15 Steffen Schaumburg 2012-06-09 10:58:39 UTC
Requiring libXaw3d[unicode] didn't help me, since my libXaw3d already had unicode enabled. But the patch "fix with libXaw3d-1.6.2" worked, thanks :)
Comment 16 Michael Weber (RETIRED) gentoo-dev 2012-06-14 01:47:40 UTC
*** Bug 421035 has been marked as a duplicate of this bug. ***
Comment 17 Markus Peloquin 2012-06-26 03:03:29 UTC
Dylan's patch works, but the ebuild is probably a better place for it.

--- /usr/portage/media-gfx/xfig/xfig-3.2.5b-r1.ebuild	2011-08-01 22:48:12.000000000 -0700
+++ xfig-3.2.5b-r1.ebuild	2012-06-25 20:01:12.425761937 -0700
@@ -53,6 +53,7 @@
 		sed -i "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} = ${varval}:" "$@"
 	done
 	sed -i "s:^\(XCOMM\)*[[:space:]]*\(#define I18N\).*$:\2:" "$@"
+	sed -i 's:^I18N_DEFS[[:space:]]*=.*:& -DXAW_INTERNATIONALIZATION:' "$@"
 	if has_version '>=x11-libs/libXaw3d-1.5e'; then
 		einfo "x11-libs/libXaw3d 1.5e and abover installed"
 		sed -i "s:^\(XCOMM\)*[[:space:]]*\(#define XAW3D1_5E\).*$:\2:" "$@"
Comment 18 David Fellows 2012-08-05 14:08:31 UTC
(In reply to comment #17)
> Dylan's patch works, but the ebuild is probably a better place for it.
> 
> --- /usr/portage/media-gfx/xfig/xfig-3.2.5b-r1.ebuild	2011-08-01
> 22:48:12.000000000 -0700
> +++ xfig-3.2.5b-r1.ebuild	2012-06-25 20:01:12.425761937 -0700
> @@ -53,6 +53,7 @@
>  		sed -i "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} =
> ${varval}:" "$@"
>  	done
>  	sed -i "s:^\(XCOMM\)*[[:space:]]*\(#define I18N\).*$:\2:" "$@"
> +	sed -i 's:^I18N_DEFS[[:space:]]*=.*:& -DXAW_INTERNATIONALIZATION:' "$@"
>  	if has_version '>=x11-libs/libXaw3d-1.5e'; then
>  		einfo "x11-libs/libXaw3d 1.5e and abover installed"
>  		sed -i "s:^\(XCOMM\)*[[:space:]]*\(#define XAW3D1_5E\).*$:\2:" "$@"

This patch worked for me. (amd64)
Comment 19 Peter Stuge 2012-08-05 14:21:24 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > Thanks! So what's the right way to fix the ebuild? Use sed to modify
> > Imakefile according to USE=nls or unicode?
> 
> Put the attached patch in files/xfig-3.2.5b-xaw-internationalization.patch
> and add epatch to the ebuild.

I wasn't asking how to apply the patch, I was asking how to properly fix this bug.

It seems that the patch may be overlooking USE flags, since it unconditionally adds the XAW_INTERNATIONALIZATION define to the Imakefile.

> the proper RDEPEND should probably be something like
> "|| ( <x11-libs/libXaw3d-1.6 >=x11-libs/libXaw3d-1.6[unicode] )".
> A better patch might be able to make the unicode part optional.

That was my point. The question is what exactly is possible, and when exactly -DXAW_INTERNATIONALIZATION is required. Is it with libXaw3d[unicode] or libXaw3d[nls] or something else?

If with libXaw3d[unicode] I guess the correct way to model that is to add IUSE=unicode also to xfig, and require it to match libXaw3d[unicode] (meaning, either both have USE=unicode, or none of them do).
Comment 20 Peter Stuge 2012-08-05 14:21:58 UTC
(In reply to comment #18)
> This patch worked for me. (amd64)

Only because you happen to have the environment that the patch assumes. The patch is not a generic fix for this bug.
Comment 21 Peter Stuge 2012-08-05 14:49:24 UTC
(In reply to comment #19)
> The question is what exactly is possible, and when
> exactly -DXAW_INTERNATIONALIZATION is required.
> Is it with libXaw3d[unicode] or libXaw3d[nls] or something else?

I'm looking into this now.
Comment 22 Juergen Rose 2012-09-20 11:16:56 UTC
I hit this error again. Masking of >=libXaw3d-1.6.2 seems to not work anymore because several packages depend on =libXaw3d-1.6.2:

root@cheetahnew:/root(179)# emerge -pvuND world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    #] x11-libs/libXaw3d-1.6.2  USE="unicode -static-libs" 0 kB

Total: 1 package (1 new), Size of downloads: 0 kB

The following mask changes are necessary to proceed:
#required by app-text/gv-3.7.3-r1, required by @selected, required by @world (argument)
# /etc/portage/package.mask:
=x11-libs/libXaw3d-1.6.2
Comment 23 Juergen Rose 2012-09-26 13:33:23 UTC
ping!
Comment 24 Paul Osmialowski 2012-09-29 09:47:55 UTC
A very quick and very dirty hack for it:
CFLAGS="-DXtNinternational=XtNfromVert" emerge xfig

Although the XtNfromVert replacement for XtNinternaltional symbol was chosen rantomly, so far I didn't notice any crash.
Comment 25 Juergen Rose 2012-10-01 11:35:34 UTC
The dirty hack seems to work for me. I can emerge xfig, can start xfig, create a figure, save and reload that figure.
Comment 26 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-10-28 20:29:44 UTC
*** Bug 426780 has been marked as a duplicate of this bug. ***
Comment 27 Peter Stuge 2012-12-13 04:22:22 UTC
(In reply to comment #17)
> Dylan's patch works, but the ebuild is probably a better place for it.

Thanks! I've committed a fixed xfig-3.2.5b-r2 ebuild to my overlay 'stuge' which is in the layman list.

Here's the story:

On Gentoo, libXaw3d was configured without --enable-international until Matt Turner committed a change to reverse the default in

http://cgit.freedesktop.org/xorg/lib/libXaw3d/commit/?id=a17b298430d3d55e92f30647346d9d3450f2f699

in response to bugs

https://bugs.freedesktop.org/show_bug.cgi?id=45144
https://bugs.freedesktop.org/show_bug.cgi?id=45153

When libXaw3d is configured *with* --enable-international then the library is built with -DXAW_INTERNATIONALIZATION set in CFLAGS.

The xfig ebuilds have unconditionally enabled internationalization since some time, this is done by the sed which changes the #define I18N line in Imakefile.

When xfig internationalization is enabled, xfig will make calls to setlocale() and use XtNinternational as defined by libXaw3d header files - *IF* -DXAW_INTERNATIONALIZATION is set in CFLAGS.

libXaw3d has been extended to include a pkg-config file, but xfig does not use the .pc file and even so, on Gentoo we want to be able to say explicitly how xfig should be built.

Thus I have added IUSE=nls into the xfig-3.2.5b-r1 ebuild in my overlay. On USE=-nls xfig will be built without I18N defined, and any libXaw3d is sufficient. On USE=nls xfig will be built with I18N defined *and* with -DXAW_INTERNATIONALIZATION in CFLAGS *and* it will RDEPEND=libXaw3d[unicode].

I've successfully built xfig with USE=-nls. I included Markus' sed for adding the define on USE=nls, I tested it manually, and USE=nls should also work fine with my ebuild.

Thanks to everyone who helped with this bug!
Comment 28 Juergen Rose 2013-02-08 18:40:25 UTC
Two month later I hit the issue again on a new system.
'CFLAGS="-DXtNinternational=XtNfromVert" emerge xfig' works again.
Comment 29 Peter Stuge 2013-02-08 18:55:44 UTC
I would still argue that the real fix is to add IUSE=nls like I have done in the ebuild in my overlay. I see that I didn't attach any patch to this bug so I guess I will do that.
Comment 30 Peter Stuge 2013-02-08 18:59:14 UTC
Created attachment 338340 [details, diff]
Add IUSE=nls to xfig-3.2.5b-r2.ebuild

Please get this committed.
Comment 31 Peter Stuge 2013-02-08 19:00:55 UTC
Patch attached. Please commit.
Comment 32 Christoph Junghans (RETIRED) gentoo-dev 2013-03-04 01:46:55 UTC
+  04 Mar 2013; Christoph Junghans <ottxor@gentoo.org>
+  +files/xfig-3.2.5b-darwin.patch, +files/xfig-3.2.5b-edit-menu.patch,
+  +files/xfig-3.2.5b-solaris.patch, +xfig-3.2.5b-r3.ebuild:
+  fixed bugs #412753 and #405475, added prefix support

@Peter: do you want to user-maintain xfig?