[oi-dev] GCC error building pkg on SPARC
Gary Mills
gary_mills at fastmail.fm
Tue Jun 5 15:51:49 UTC 2018
I'm attempting to build the pkg package on a T2000 (SPARC). I get
this error on the first compile:
/usr/gcc/4.4.4/bin/gcc -fno-strict-aliasing -m32 -O3 -mno-app-regs
-fPIC -DPIC -std=c99 -D_XOPEN_SOURCE=600 -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC -DPIC -Imodules -I/usr/include/python2.7 -c
modules/actions/_actions.c -o
/dpool/export/home/mills/Downloads/code/oi-userland-apr/components/openindiana/pkg/pkg/proto/build_sparc/temp64.solaris-2.11-sun4v.32bit-2.7/modules/actions/_actions.o
-O3 -D__EXTENSIONS__ -Werror -m64
gcc: may not use both -m32 and -m64
Apparently, x86 builds do not have this problem because gcc on x86
allows both architecture arguments, even though they conflict. The
extra argument is added by this code in pkg/src/setup.py:
# Set up for 64-bit
old_build_temp = self.build_temp
d, f = os.path.split(self.build_temp)
# store our 64-bit extensions elsewhere
self.build_temp = d + "/temp64.{0}".format(
os.path.basename(self.build_temp).replace("temp.", ""))
ext.extra_compile_args += ["-m64"]
ext.extra_link_args += ["-m64"]
self.build64 = True
# Build 64-bit
_build_ext.build_extension(self, ext)
# Reset to 32-bit
self.build_temp = old_build_temp
ext.extra_compile_args.remove("-m64")
ext.extra_link_args.remove("-m64")
self.build64 = False
It should be removing the first `-m32' when it adds `-m64' to the
command line, and restoring it afterwards.
What do I need to change to accomplish this? I have no experience
in writing Python code.
--
-Gary Mills- -refurb- -Winnipeg, Manitoba, Canada-
More information about the oi-dev
mailing list