Pugs link error

7 views
Skip to first unread message

BÁRTHÁZI András

unread,
May 25, 2005, 8:44:47 AM5/25/05
to perl6-c...@perl.org
Hi,

I lost myself a few weeks ago, and still not found: I'm unable to compile
Pugs. On IRC, about a week ago, Autrijus helped me, but still not working
(but the light are closer).

I've Debian Sid (but a lot of things are from source, so it's not true),
GHC 6.4 compiled from source, Perl 5.8.6 (from source), Parrot 0.2.0 devel
r8065, and Pugs the latest from SVN.

If I try to link Pugs with Parrot and Perl5, I got this message:

Linking ...
src/perl5/perl5.o: In function `xs_init':
src/perl5/perl5.o(.text+0xc): undefined reference to `boot_DynaLoader'
/usr/local/lib/ghc-6.4/libgmp.a(set_str.o): In function
`digit_value_in_base':
/playpen/ghc/nightly/STABLE-cam-02-unx/i386-unknown-linux/ghc/rts/gmp/mpz/set_str.c:44:
undefined reference to `__ctype_b_loc'
/usr/local/lib/ghc-6.4/libgmp.a(set_str.o): In function `__gmpz_set_str':
/playpen/ghc/nightly/STABLE-cam-02-unx/i386-unknown-linux/ghc/rts/gmp/mpz/set_str.c:77:
undefined reference to `__ctype_b_loc'
/playpen/ghc/nightly/STABLE-cam-02-unx/i386-unknown-linux/ghc/rts/gmp/mpz/set_str.c:149:
undefined reference to `__ctype_b_loc'
collect2: ld returned 1 exit status
make: *** [pugs] Error 1

If I try to link Pugs with Parrot and without Perl5, I got this message:

Linking ...
/usr/local/lib/ghc-6.4/libgmp.a(set_str.o): In function
`digit_value_in_base':
/playpen/ghc/nightly/STABLE-cam-02-unx/i386-unknown-linux/ghc/rts/gmp/mpz/set_str.c:44:
undefined reference to `__ctype_b_loc'
/usr/local/lib/ghc-6.4/libgmp.a(set_str.o): In function `__gmpz_set_str':
/playpen/ghc/nightly/STABLE-cam-02-unx/i386-unknown-linux/ghc/rts/gmp/mpz/set_str.c:77:
undefined reference to `__ctype_b_loc'
/playpen/ghc/nightly/STABLE-cam-02-unx/i386-unknown-linux/ghc/rts/gmp/mpz/set_str.c:149:
undefined reference to `__ctype_b_loc'
collect2: ld returned 1 exit status
make: *** [pugs] Error 1

Can you help me? Both error messages says nothing to me.

And an extra question: do I need to compile in Perl5, if I would like to
use Perl5 modules with Pugs?

Thx,
Andras

Autrijus Tang

unread,
May 25, 2005, 10:28:47 AM5/25/05
to BÁRTHÁZI András, perl6-c...@perl.org
On Wed, May 25, 2005 at 02:44:47PM +0200, BÁRTHÁZI András wrote:
>
> I've Debian Sid (but a lot of things are from source, so it's not true),
> GHC 6.4 compiled from source, Perl 5.8.6 (from source), Parrot 0.2.0 devel
> r8065, and Pugs the latest from SVN.
>
> If I try to link Pugs with Parrot and Perl5, I got this message:
>
> Linking ...
> src/perl5/perl5.o: In function `xs_init':
> src/perl5/perl5.o(.text+0xc): undefined reference to `boot_DynaLoader'

Lookat your src/Pugs/pugs_config.h and make sure that the PUGS_HAS_PERL5 thing
is defined to 1. Also rm src/Pugs/Embed/Perl5.o and Perl5.hi before
continuing -- you may need to rm the other .o files that depend on it
too.

> And an extra question: do I need to compile in Perl5, if I would like to
> use Perl5 modules with Pugs?

For now, yes. We may be able to figure out a way to marshal this with
an external Perl 5 interpreter, much like what we did with PGE and
external parrot, but that may take a while to happen.

Thanks,
/Autrijus/

BÁRTHÁZI András

unread,
May 25, 2005, 3:29:56 PM5/25/05
to Autrijus Tang, perl6-c...@perl.org
Hi,

> Lookat your src/Pugs/pugs_config.h and make sure that the PUGS_HAS_PERL5 thing
> is defined to 1. Also rm src/Pugs/Embed/Perl5.o and Perl5.hi before
> continuing -- you may need to rm the other .o files that depend on it
> too.

It helps for that error, but not for the other one. Still get this:

Linking ...
/usr/local/lib/ghc-6.4/libgmp.a(set_str.o): In function
`digit_value_in_base':
/playpen/ghc/nightly/STABLE-cam-02-unx/i386-unknown-linux/ghc/rts/gmp/mpz/set_str.c:44:
undefined reference to `__ctype_b_loc'
/usr/local/lib/ghc-6.4/libgmp.a(set_str.o): In function `__gmpz_set_str':
/playpen/ghc/nightly/STABLE-cam-02-unx/i386-unknown-linux/ghc/rts/gmp/mpz/set_str.c:77:
undefined reference to `__ctype_b_loc'
/playpen/ghc/nightly/STABLE-cam-02-unx/i386-unknown-linux/ghc/rts/gmp/mpz/set_str.c:149:
undefined reference to `__ctype_b_loc'
collect2: ld returned 1 exit status
make: *** [pugs] Error 1

I've found this:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86465

and this:
http://newweb.ices.utexas.edu/misc/ctype.c

I've created ~/.ifcrc file, ctype.c, too, but I see no changes. As it
takes hours, I not yet recompiled GHC 6.4, because I think it wouldn't
help (just a guess).

The problem is about GLIBC, but I don't know theses libraries. I cannot
install GHC from deb package (I tried), because of this library problem,
too.

Any ideas? I still would like to check the fast p6 rules and the amazing
p5 DBI with pugs!!!! ;) :((

Bye,
Andras

Autrijus Tang

unread,
May 26, 2005, 11:34:36 PM5/26/05
to BÁRTHÁZI András, Autrijus Tang, perl6-c...@perl.org
On Wed, May 25, 2005 at 09:29:56PM +0200, BÁRTHÁZI András wrote:
> It helps for that error, but not for the other one. Still get this:

I think rgs have fixed that one as well. Try again?

You can use this as the test script -- it works for me:

use DBI--perl5;

unlink 'test.db';

my $dbh = DBI.connect('dbi:SQLite:dbname=test.db');
$dbh.do("CREATE TABLE Test (Project, Pumpking)");

my $sth = $dbh.prepare("INSERT INTO Test VALUES (?, ?)");
$sth.execute(<Pugs Autrijus>);
$sth.execute(<Ponie Nicholas>);
$sth.execute(<Parrot Leo>);

my $res = $dbh.selectall_hashref('SELECT * FROM Test', 'Pumpking');

# Just another Pugs hacker
say "Just another $res<Autrijus><Project> hacker";

Thanks,
/Autrijus/

Reply all
Reply to author
Forward
0 new messages