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
Created attachment 303005 [details] emerge --info
Please attach the entire build log to this bug report.
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.
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?
Thanks for the tip about libXaw3d. Downgrading it to 1.5 works here for now.
*** Bug 413707 has been marked as a duplicate of this bug. ***
*** Bug 408293 has been marked as a duplicate of this bug. ***
If I mask >=x11-libs/libXaw3d-1.6.2 , then Bug 413707 (https://bugs.gentoo.org/show_bug.cgi?id=413707) disappears.
Created attachment 312227 [details, diff] media-gfx/xfig-3.2.5b-r2 DEPEND <x11-libs/libXaw3d-1.6
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?
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..
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.
(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?
(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.
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 :)
*** Bug 421035 has been marked as a duplicate of this bug. ***
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:" "$@"
(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)
(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).
(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.
(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.
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
ping!
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.
The dirty hack seems to work for me. I can emerge xfig, can start xfig, create a figure, save and reload that figure.
*** Bug 426780 has been marked as a duplicate of this bug. ***
(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!
Two month later I hit the issue again on a new system. 'CFLAGS="-DXtNinternational=XtNfromVert" emerge xfig' works again.
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.
Created attachment 338340 [details, diff] Add IUSE=nls to xfig-3.2.5b-r2.ebuild Please get this committed.
Patch attached. Please commit.
+ 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?