Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 103072 - www-apps/swish-e-2.4.3 cannot compile with "perl" USE flag
Summary: www-apps/swish-e-2.4.3 cannot compile with "perl" USE flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
: 117630 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-19 11:20 UTC by dswhite42
Modified: 2006-01-16 07:54 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dswhite42 2005-08-19 11:20:47 UTC
If the "perl" USE flag is set, SWISH-E will compile itself normally, then go
into the ${SRC}/perl directory to compile the Perl SWISH::API module.  The
compilation of the main binary and libraries for SWISH-E is fine.  The trouble
occurs once the emerge process gets to the Perl module:

 * Using ExtUtils::MakeMaker
Using swish-config found at
[/var/tmp/portage/swish-e-2.4.3/image/usr/bin/swish-config]
Checking if your kit is complete...
Looks good
Writing Makefile for SWISH::API
cp API.pm blib/lib/SWISH/API.pm
/usr/bin/perl5.8.7 /usr/lib/perl5/5.8.7/ExtUtils/xsubpp -noprototypes -typemap
/usr/lib/perl5/5.8.7/ExtUtils/typemap -typemap typemap  API.xs > API.xsc && mv
API.xsc API.c
i686-pc-linux-gnu-gcc -c  -O3 -march=pentium4 -pipe -fomit-frame-pointer
-I/usr/include -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O3 -march=pentium4 -pipe -fomit-frame-pointer  
-DVERSION=\"0.03\" -DXS_VERSION=\"0.03\" -fPIC
"-I/usr/lib/perl5/5.8.7/i686-linux/CORE"   API.c
API.xs:7:21: swish-e.h: No such file or directory
API.xs:31: error: parse error before "SW_META"
API.xs:31: warning: no semicolon at end of struct or union
API.xs:32: warning: data definition has no type or storage class
API.xs: In function `XS_SWISH__API_new':
API.xs:53: error: `SW_HANDLE' undeclared (first use in this function)
API.xs:53: error: (Each undeclared identifier is reported only once
API.xs:53: error: for each function it appears in.)
API.xs:53: error: parse error before "handle"
API.xs:57: error: `handle' undeclared (first use in this function)
API.c: In function `XS_SWISH__API_DESTROY':
API.c:83: error: `SW_HANDLE' undeclared (first use in this function)
API.c:83: error: parse error before "self"
API.c:86: error: `self' undeclared (first use in this function)
API.c: In function `XS_SWISH__API_IndexNames':
API.c:106: error: `SW_HANDLE' undeclared (first use in this function)
API.c:106: error: parse error before "self"
API.c:113: error: `self' undeclared (first use in this function)

These errors go on for a while.

The key to the problem is found in the first error near the top:

API.xs:7:21: swish-e.h: No such file or directory

In a non-gentoo, manual-compilation environment, SWISH-E is intended to be fully
compiled AND INSTALLED before the user returns to the source directory to
compile the Perl module.  This allows the libraries to be installed and
swish-e.h to be installed in /usr/include, which the Perl module building
process will need.  But since this ebuild tries to build the Perl module before
it finishes installing the main libraries and headers, the Perl module
compilation fails.

WORKAROUND:
1) Edit the main (or an overlay) swish-e-2.4.3.ebuild and comment out everything
in the src_install() section starting with "if use perl ; then" and ending with
"fi".  (lines 49-55)

2) "emerge swish-e"

3) Once that's done, undo everything you did in step 1, returning
swish-e-2.4.3.ebuild back to its original state.

4) "emerge swish-e".  This time the Perl module will be built, because it will
automatically find the libraries and swish-e.h file built and installed from the
earlier emerge in step 2.

SUGGESTED PERMANENT FIX:
Have the ebuild install the main SWISH-E program, along with all its headers and
libraries, into /usr/lib, /usr/include, etc. before building the Perl module.

Thanks.
Comment 1 Bernhard Bock 2005-08-26 07:34:50 UTC
Same problem here.

Workaround works fine for me.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-09-04 04:12:24 UTC
Mass re-assign.
Comment 3 Damon Cortesi 2005-09-30 07:09:40 UTC
This seems similar to issues discussed in bug #37165.

All that needs to be done is modify the perl Makefile.PL to include:
CCFLAGS       => '-I../src',

I made this change and it seems to work great!
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-11-09 09:17:18 UTC
Mass re-assign.
Comment 5 M. Edward Borasky 2005-12-11 15:14:43 UTC
I just rebuilt swish-e 2.4.3 from the upstream source manually and didn't have
any problems at all. Is this something broken in the ebuild??

See bug 115230 -- I'm trying to get the swish-e ebuild to install some sample
code that doesn't show up at the moment. I'd prefer 2.4.3 to 2.2.2, which is
what's stable in the tree.
Comment 6 Michael Cummings (RETIRED) gentoo-dev 2005-12-16 03:55:43 UTC
The ebuild works fine over here. (2.4.3-r1) One difference between the ebuild
and doing it manually that I can think of is that portage passes on cflags,
etc., while doing it on the commandline won't unless you specified them. I
realize 03 isn't exactly ricer settings, but is this a dual processor? If not,
can you try with 02 to at least confirm that swish-e isn't happily compiling
under the extra optimization?
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-01-03 10:35:46 UTC
*** Bug 117630 has been marked as a duplicate of this bug. ***
Comment 8 Renat Lumpau (RETIRED) gentoo-dev 2006-01-15 16:58:24 UTC
Doesn't work for me with USE="perl":

 * Using ExtUtils::MakeMaker
Using swish-config found at [/var/tmp/portage/swish-e-2.4.3-r1/image/usr/bin/swish-config]
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lswish-e
Writing Makefile for SWISH::API

Then a bunch of errors like API.xs:53: error: 
Comment 9 Renat Lumpau (RETIRED) gentoo-dev 2006-01-15 16:58:24 UTC
Doesn't work for me with USE="perl":

 * Using ExtUtils::MakeMaker
Using swish-config found at [/var/tmp/portage/swish-e-2.4.3-r1/image/usr/bin/swish-config]
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lswish-e
Writing Makefile for SWISH::API

Then a bunch of errors like API.xs:53: error: SW_HANDLE undeclared (first use in this function)

and dies with 
{standard input}: Assembler messages:
{standard input}:13: Error: symbol `PL_stack_sp' is already defined
make: *** [API.o] Error 1

CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"

Nothing to do with CFLAGS, judging from the -lswish-e issue.
Comment 10 Michael Cummings (RETIRED) gentoo-dev 2006-01-16 06:45:54 UTC
fixed, sync and close - r103, i'd like to take this out of package.mask, no longer 'severely broken' as beu had it marked.
Comment 11 Renat Lumpau (RETIRED) gentoo-dev 2006-01-16 07:54:08 UTC
thanks.

all set with -r2, out of p.mask.