I'm referring to the Perl source make
Aaah ... however, I don't think the LINKTYPE=static argument does anything.
It's a long time since I've built perl statically, and I'm a bit hazy on the details. So I just tried a build of 5.26.0 configured with '-des -Uusedl -Dprefix=/home/me/perl526-static'.
However, that fails at the 'make' stage with:
libperl.a(regexec.o): In function `Perl__is_grapheme':
regexec.c:(.text+0x12b70): multiple definition of `Perl__is_grapheme'
lib/auto/re/re.a(re_exec.o):re_exec.c:(.text+0x1c020): first defined h
+ere
collect2: error: ld returned 1 exit status
makefile:369: recipe for target 'perl' failed
make: *** [perl] Error 1
Have I missed something in my Configure args ? (Running 'make LINKTYPE=static' makes no difference.)
What is your 'perl -V' output ?
When I finish writing this, I'll try current blead - and send a post to p5p if it also fails to build statically.
Having had a read through the INSTALL file, it seems to me that what you've done should have worked ... but clearly hasn't wrt YAML::XS.
Do any of the other ext modules throw the same error when you try to load them ?
Try re-building YAML::XS from *fresh* source with:
perl Makefile.PL LINKTYPE=static
make
perl -Mblib -MYAML::XS -E 1
Does that last command then run without error ?
UPDATE: Building perl statically from current git source (commit 97fcda7...) works fine for me, with all tests passing. For some reason 'make test' doesn't run the ext/YAML-LibYAML test suite
And I get the same results as
rodd.
It makes no difference to the error whether YAML::XS is built with perl (in the ext directory) or built separately after the static perl has been built and installed.
I'm thinking that there's a bug in the way that YAML::XS is being dealt with. The INSTALL file does state this:
<quote>
If you unpack any additional extensions in the ext/ directory before
running Configure, then Configure will offer to build those additional
extensions as well. Most users probably shouldn't have to do this --
it is usually easier to build additional extensions later after perl
has been installed. However, if you wish to have those additional
extensions statically linked into the perl binary, then this offers a
convenient way to do that in one step.
</quote>
UPDATE 2: There's a bit more to it than I expected. I was able to get a loadable YAML::XS installed as per follows:
cd YAML-LibYAML-0.65
perl Makefile.PL
make perl
make -f Makefile.aperl inst_perl MAP_TARGET=perl
make -f Makefile.aperl map_clean
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.