texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Perl's cc


From: Gavin Smith
Subject: Re: Using Perl's cc
Date: Sat, 11 Jul 2015 16:57:05 +0100

On 11 July 2015 at 16:32, Eli Zaretskii <address@hidden> wrote:
>> The fact you had to override PERL_INC suggests that the compiler flags
>> should also have been overridden (e.g. use the right installed Perl in
>> the fetch_conf.pl script), but might not have been.
>
> Ah, you are right.  For some reason, I thought you only take the -I
> options from the ccflags configuration variable.  So now I tried:
>
>   $ make PERL_INC=/d/usr/Perl/lib/CORE LDFLAGS='-no-undefined 
> -L/d/usr/Perl/lib/CORE -lperl520' PERL_CONF_ccflags='-DWIN32 
> -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT 
> -DPERL_IMPLICIT_SYS -DUSE_PERLIO'
>
> and got these compilation errors:
>
>   mylib/xspara.c: In function 'xspara_hello':
>   d:/usr/Perl/lib/CORE/perl.h:155:16: error: 'my_perl' undeclared (first use 
> in this function)
>    #  define aTHX my_perl
>                   ^
>   d:/usr/Perl/lib/CORE/embedvar.h:38:18: note: in expansion of macro 'aTHX'
>    #    define vTHX aTHX
>                     ^
>   d:/usr/Perl/lib/CORE/embedvar.h:58:19: note: in expansion of macro 'vTHX'
>    #define PL_Mem   (vTHX->IMem)
>                      ^

The -DPERL_IMPLICIT_CONTEXT flag may be causing problems. Could you
try the change below?

There's some information about PERL_IMPLICIT_CONTEXT in "How do I use
all this in extensions?" in "man perlguts" although I didn't see it
say anywhere to #undef it, but looking at some header files
(embedvar.h, definition of vTHX) I think it would make a difference.

Index: xspara.c
===================================================================
--- xspara.c    (revision 6411)
+++ xspara.c    (working copy)
@@ -10,6 +10,7 @@
 #include <wchar.h>
 #include <wctype.h>

+#undef PERL_IMPLICIT_CONTEXT
 /* See "How do I use all this in extensions in 'man perlguts'. */
 #define PERL_NO_GET_CONTEXT



reply via email to

[Prev in Thread] Current Thread [Next in Thread]