New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
64 bit build failure on Solaris 9 #6902
Comments
From djberge@qwest.comHi, I can't seem to get Solaris to build as 64 bit.
Sun's ld, as and ar (i.e. /usr/ccs/... is first in my PATH) Built with sh Configure -Dusethreads -Duse64bitall -Dcc=gcc I also tried explicitly adding -B/usr/ccs/bin, *just in case* Configure seems to work smoothly, although I end up with 2 makefiles: make: Warning: Both `makefile' and `Makefile' exist Hmm...strange. Anyway, I then performed make. Did fine until I got CCCMD = gcc -B/usr/ccs/bin/ -DPERL_CORE -c -D_REENTRANT -mcpu=v9 -m64 I read through the README.solaris, and messed around with the Makefile Any ideas? I've attached a copy of the Makefile as well to help. I Regards, Dan Makefile: # Makefile.SH LDFLAGS = -L/usr/lib/sparcv9 -L/usr/ccs/lib mallocsrc = # The following are mentioned only to make metaconfig include the # The following are used to build and install shared libraries for # Static targets are ordinarily built without CCCDLFLAGS. However, # The following is used to include the current directory in dynamic_ext = lib/auto/B/B.so lib/auto/ByteLoader/ByteLoader.so libs = -lsocket -lnsl -ldl -lm -lpthread -lc public = perl$(EXE_EXT) utilities translators shellflags = # This is set to MAKE=make if your make command doesn't # Mention gmake here so it gets probed for by Configure. # These variables may need to be manually set for non-Unix systems. FIRSTMAKEFILE = makefile # Any special object files needed by this architecture, e.g. os2/os2.obj .SUFFIXES: .c $(OBJ_EXT) .i .s # grrr # how to tr(anslate) newlines OPTIMIZE = -O EXTRAS = INSTALLPREFIXEXP = /usr/local CCCMD = `sh CCCMDSRC = `sh private = preplibrary lib/Config.pm lib/ExtUtils/Miniperl.pm # Files to be built with variable substitution before miniperl shextract = Makefile cflags config.h makeaperl makedepend \ # Files to be built with variable substitution after miniperl is pl = pod/pod2html.PL pod/pod2latex.PL pod/pod2man.PL pod/pod2text.PL \ # lib/lib.pm is not listed here because it has a rule of its own. addedbyconf = UU h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c c = obj1 = obj = lintflags = -hbvxac .c$(OBJ_EXT): .c.i: .c.s: all: .PHONY: all compile translators utilities compile: all translators: miniperl$(EXE_EXT) lib/Config.pm FORCE utilities: miniperl$(EXE_EXT) lib/Config.pm $(plextract) lib/lib.pm # This is now done by installman only if you actually want the man # Phony target to force checking subdirectories. # We do a copy of the op.c instead of a symlink because gcc gets huffy opmini$(OBJ_EXT): op.c config.h miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE) perlmain$(OBJ_EXT): perlmain.c # The file ext.libs is a list of libraries that must be linked in
# How to build executables. # The $& notation tells Sequent machines that it can do a parallel make, miniperl$(EXE_EXT): perl$(EXE_EXT): # Purify/Quantify Perls. pureperl$(EXE_EXT): purecovperl$(EXE_EXT): quantperl$(EXE_EXT): # Valgrind perl (currently Linux only) perl.valgrind.config: config.sh # Third Degree Perl (Tru64 only) perl.config.dashg: perl.third.config: config.sh perl.third: /usr/bin/atom perl.third.config perl # Pixie Perls (Tru64 and IRIX only) perl.pixie.config: config.sh perl.pixie.atom: /usr/bin/atom perl perl.pixie.irix: perl perl.pixie: /usr/bin/pixie perl.pixie.config perl # Gprof Perl perl.config.dashpg: perl.gprof.config: config.sh perl.gprof: /usr/bin/gprof perl.gprof.config # Gcov Perl perl.config.gcov:
perl.gcov: perl.config.gcov # Microperl. This is just a convenience thing if one happens to .PHONY: microperl # This version, if specified in Configure, does ONLY those scripts which suidperl$(EXE_EXT): sperl$(OBJ_EXT): perl.c $(h) # We have to call our ./makedir because Ultrix 4.3 make can't handle the # Take care to avoid modifying lib/Config.pm without reason lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl$(EXE_EXT) minimod.pl lib/re.pm: ext/re/re.pm
x2p/s2p: miniperl$(EXE_EXT) lib/Config.pm x2p/s2p.PL lib/lib.pm: miniperl$(EXE_EXT) lib/Config.pm extra.pods: miniperl$(EXE_EXT) extras.make: perl$(EXE_EXT) extras.test: perl$(EXE_EXT) extras.install: perl$(EXE_EXT) .PHONY: install install-strip install-all install-verbose install-silent META.yml: Porting/makemeta Porting/Maintainers.pl install-strip: install install-all: install-verbose: install-silent: no-install: install.perl: all installperl install.man: all installman # XXX Experimental. Hardwired values, but useful for testing. # I now supply perly.c with the kits, so the following section is .PHONY: check_byacc run_byacc check_byacc: run_byacc: FORCE check_byacc # We don't want to regenerate perly.c and perly.h, but they might perly.h: perly.y PERLYVMS = vms/perly_c.vms vms/perly_h.vms $(PERLYVMS): perly.c perly.h vms/vms_yfix.pl # No compat3.sym here since and including the 5.004_50. SYMH = perlvars.h intrpvar.h thrdvar.h CHMOD_W = chmod +w # The following files are generated automatically AUTOGEN_FILES = keywords.h opcode.h opnames.h pp_proto.h pp.sym proto.h .PHONY: regen_headers regen_pods regen_all regen regen_headers: FORCE regen_pods: FORCE regen_all: $(PERLYVMS) regen regen_pods .PHONY: manisort manicheck manisort: FORCE manicheck: FORCE # Extensions:
d_dummy s_dummy n_dummy .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \ clean: _tidy _mopup realclean: _realcleaner _mopup _clobber: clobber: _realcleaner _mopup _clobber distclean: clobber # Like distclean but also removes emacs backups and *.orig. # Do not 'make _mopup' directly. # Do not 'make _tidy' directly. _cleaner1: # Some systems do not support "?", so keep these files separate. _realcleaner: _verycleaner: # The following lint has practically everything turned on. .PHONY: lint # Need to unset during recursion to go out of loop. MAKEDEPEND = Makefile makedepend
config.h: config_h.SH config.sh # When done, touch perlmain.c so that it doesn't get remade each time. # Cannot postpone this until $firstmakefile is ready ;-) .PHONY: test check test_prep test_prep_nodll test_prep_pre _test_prep \ # Cannot delegate rebuilding of t/perl to make TESTFILE=TEST _test_prep: # Architecture-neutral stuff: test_prep_pre: preplibrary utilities $(nonxs_ext) test_prep: test_prep_pre miniperl$(EXE_EXT) perl$(EXE_EXT) _test_tty: _test_notty: # The second branch is for testing without a tty or controlling test check: test_prep test_tty: test_prep test_notty: test_prep utest ucheck test.utf8 check.utf8: test_prep coretest: test_prep test-prep: test_prep test-tty: test_tty test-notty: test_notty # Torture testing test.torture torturetest: test_prep # Targets for valgrind testing: test_prep.valgrind: test_prep perl.valgrind test.valgrind check.valgrind: test_prep perl.valgrind.config utest.valgrind ucheck.valgrind: test_prep.valgrind perl.valgrind test_notty.valgrind: test_prep.valgrind perl.valgrind # Targets for Third Degree testing. test_prep.third: test_prep perl.third test.third check.third: test_prep.third perl.third utest.third ucheck.third: test_prep.third perl.third test_notty.third: test_prep.third perl.third # Targets for Bytecode/ByteLoader testing. test.bytecompile: test_prep # Targets for Deparse testing. test.deparse: test_prep test_notty.deparse: test_prep # Targets to run the test suite with -t test.taintwarn: test_prep # Can't depend on lib/Config.pm because that might be where miniperl # Test via harness test_harness: test_prep test_harness_notty: test_prep # Handy way to run perlbug -ok without having to install and run the .PHONY: ok okfile oknack okfilenack nok nokfile noknack nokfilenack ok: utilities okfile: utilities oknack: utilities okfilenack: utilities nok: utilities nokfile: utilities noknack: utilities nokfilenack: utilities .PHONY: clist hlist shlist pllist clist: $(c) hlist: $(h) shlist: $(sh) pllist: $(pl) Makefile: Makefile.SH ./config.sh .PHONY: distcheck .PHONY: elc emacs/cperl-mode.elc: emacs/cperl-mode.el .PHONY: etags ctags tags etags: TAGS TAGS: emacs/cperl-mode.elc ctags: tags # Let's hope make will not go into an infinite loop on case-unsensitive # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE |
From @AlanBurlisonBerger, Daniel (via RT) wrote:
I don't use gcc, but from looking at the gcc flags and the linker error -- |
From djberge@qwest.com
No, it's definitely a clean build. Could the default Perl installation Regards, Dan |
From @AlanBurlisonBerger, Daniel wrote:
I very much doubt it. What does 'file *.o' say when run in the build directory? -- |
From @doughera88On Mon, 10 Nov 2003, Alan Burlison wrote:
Yes, I think that's almost it. Looking closely at the command line gcc -o miniperl miniperlmain.o opmini.o libperl.a [ . . .] miniperlmain.o is the first object file mentioned. By the time ld ld: fatal: file miniperlmain.o: wrong ELF class: ELFCLASS64 That means that ld has seen something earlier that was LP32. I'll If I'm right, the culprit is this bit in the current hints/solaris_2.sh The problem is that $ldflags are sent to $ld, which is actually $cc on In brief, although /usr/ccs/bin/ld doesn't need any specific flags, gcc I don't have gcc-3.3 to test (my Solaris gcc installation is still Inline Patch--- perl-5.8.2/hints/solaris_2.sh Mon Oct 27 12:27:29 2003
+++ perl-5.8.2-andy/hints/solaris_2.sh Thu Nov 20 09:24:38 2003
@@ -516,14 +516,13 @@
loclibpth="/usr/lib/sparcv9 $loclibpth"
ccflags="$ccflags -mcpu=v9 -m64"
if test X`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null` != X; then
+ # This adds in -Wa,-xarch=v9. I suspect that's superfluous,
+ # since the -m64 above should do that already. Someone
+ # with gcc-3.x.x, please test with gcc -v. A.D. 20-Nov-2003
ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
fi
- # no changes to ld flags, as (according to man ld):
- #
- # There is no specific option that tells ld to link 64-bit
- # objects; the class of the first object that gets processed
- # by ld determines whether it is to perform a 32-bit or a
- # 64-bit link edit.
+ ldflags="$ldflags -m64"
+ lddlflags="$lddlflags -m64"
;;
*)
ccflags="$ccflags `getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
-- |
From @AlanBurlisonAndy Dougherty wrote:
Makes sense. Nice catch :-) -- |
From djberge@qwest.com
Thanks Andy. I made the changes you suggested. We're getting further, Making B (dynamic) The only warning I saw during the build that I thought might be gcc -m64 -L/usr/lib/sparcv9 -L/usr/local/lib -o miniperl \ I also tried commenting out the -Wa, -xarch stuff in the solaris hint Any ideas? Something about crt1.o again? Regards, Dan (Sorry if this is a repeat - mail problems here) |
From @doughera88On Thu, 20 Nov 2003, Daniel Berger wrote:
Oh. This one's my fault. Try changing the line
in hints/solaris_2.sh to
(I think that's the right flag for gcc on Solaris using Sun's ld.) Andy Dougherty doughera@lafayette.edu |
From djberge@qwest.com
<snip>
That worked! Thanks!!! Regards, Dan |
@rgs - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#24439 (status was 'resolved')
Searchable as RT24439$
The text was updated successfully, but these errors were encountered: