[英]compiling perl as 64 bit on solaris 10 sparc
I am trying to compile perl 5.22.2
on Solaris
, sparc, as 64 bit (os is 64 bit). 我正在尝试在Solaris
sparc perl 5.22.2
编译为64位(操作系统为64位)。 It compiled and linked fine as a 32 bit binary, now I have added the -m64
flag to CFLAGS
and LDFLAGS
, and I am getting the following error: 它作为32位二进制文件进行了编译和链接,现在,我将-m64
标志添加到CFLAGS
和LDFLAGS
,并且出现以下错误:
...skipping...
perlio.c:3400: error: structure has no member named `_ptr'
perlio.c:3408: error: structure has no member named `_ptr'
perlio.c: In function `PerlIOStdio_get_base':
perlio.c:3531: error: structure has no member named `_base'
perlio.c: In function `PerlIOStdio_get_bufsiz':
perlio.c:3538: error: structure has no member named `_cnt'
perlio.c:3538: error: structure has no member named `_ptr'
perlio.c:3538: error: structure has no member named `_base'
perlio.c: In function `PerlIOStdio_get_ptr':
perlio.c:3547: error: structure has no member named `_ptr'
perlio.c: In function `PerlIOStdio_get_cnt':
perlio.c:3554: error: structure has no member named `_cnt'
perlio.c: In function `PerlIOStdio_set_ptrcnt':
perlio.c:3575: error: structure has no member named `_ptr'
perlio.c:3594: error: structure has no member named `_cnt'
make: *** [perlio.o] Error 1
For reference, i have extracted the mentioned lines from perlio.c
: 作为参考,我从perlio.c
提取了上述行:
3400: STDCHAR *eptr = (STDCHAR*)PerlSIO_get_ptr(s);
3408: if ((STDCHAR*)PerlSIO_get_ptr(s) != --eptr || ((*eptr & 0xFF) != ch)) {
3531: return (STDCHAR*)PerlSIO_get_base(stdio);
3538: return PerlSIO_get_bufsiz(stdio);
3547: return (STDCHAR*)PerlSIO_get_ptr(stdio);
3554: return PerlSIO_get_cnt(stdio);
3575: PerlSIO_set_ptr(stdio, ptr); /* LHS STDCHAR* cast non-portable */
3594: PerlSIO_set_cnt(stdio, cnt);
It looks like its doing something strange with the source, notice how _ptr
is treated as a seperate entity, whereas the function is called PerlSIO_get_ptr
. 看起来它对源代码做了一些奇怪的事情,请注意_ptr
如何被视为单独的实体,而该函数称为PerlSIO_get_ptr
。 Looks like its being cut off. 看起来像它被切断了。
Anyone any idea what is going on here? 有人知道这里发生了什么吗? FYI using something like perlbrew is not an option, I need to compile this myself :(. 仅供参考,不要使用perlbrew之类的东西,我需要自己编译:(。
It turns out I needed to add the -Duse64bitall
flag to the Configure
script. 事实证明,我需要将-Duse64bitall
标志添加到Configure
脚本。 So finally I was able to build with 所以最终我能够与
export CFLAGS=-m64 # not sure if really nessessary - just what I did
./Configure -Duse64bitall -Dcc=gcc -d
make
For my setup I also need some more libraries, so this is a rather simplified version. 对于我的设置,我还需要更多的库,因此这是一个相当简化的版本。 However it solved the problem described in this post. 但是,它解决了本文中描述的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.