From owner-freebsd-gecko@FreeBSD.ORG Tue Jun 23 16:26:08 2009 Return-Path: Delivered-To: freebsd-gecko@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3D781065674 for ; Tue, 23 Jun 2009 16:26:08 +0000 (UTC) (envelope-from lioux@FreeBSD.org) Received: from goat.gigo.com (ipv6.gigo.com [IPv6:2001:470:1:18::2]) by mx1.freebsd.org (Postfix) with ESMTP id BB47A8FC20 for ; Tue, 23 Jun 2009 16:26:08 +0000 (UTC) (envelope-from lioux@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by goat.gigo.com (Postfix) with ESMTP id A5F3986AB for ; Tue, 23 Jun 2009 09:26:08 -0700 (PDT) Received: from goat.gigo.com ([127.0.0.1]) by localhost (vette.gigo.com [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id zUC2Etpr8Fdi for ; Tue, 23 Jun 2009 09:26:08 -0700 (PDT) Received: from 201.40.49.38 (201-40-49-38.bsace702.dsl.brasiltelecom.net.br [201.40.49.38]) by goat.gigo.com (Postfix) with ESMTPSA id 6C07083A0 for ; Tue, 23 Jun 2009 09:26:07 -0700 (PDT) Received: (qmail 34676 invoked by uid 80); 23 Jun 2009 13:24:24 -0300 Received: from 200.201.164.9 ([200.201.164.9]) by exxodus.dyndns.org (Horde Framework) with HTTP; Tue, 23 Jun 2009 13:24:23 -0300 Message-ID: <20090623132423.16266s6vjhtqzkow@exxodus.dyndns.org> Date: Tue, 23 Jun 2009 13:24:23 -0300 From: Mario Sergio Fujikawa Ferreira To: Stanislav Sedov References: <20090614105649.7962.qmail@exxodus.fedaykin.here> <20090614155142.8cd7f892.stas@FreeBSD.org> (sfid-20090614_09001_088A9EDF) (sfid-20090614_09001_088A9EDF) In-Reply-To: <20090614155142.8cd7f892.stas@FreeBSD.org> (sfid-20090614_09001_088A9EDF) (sfid-20090614_09001_088A9EDF) MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) 4.3.3 / FreeBSD-7.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-Description: Plaintext Version of Message X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-gecko@FreeBSD.org, bug-followup@FreeBSD.org Subject: Re: ports/132294: [PATCH] lang/ruby18: Add option to build with Profile-Guided Optimization X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2009 16:26:09 -0000 Hi, I do not think this is exclusive to PGO (profile guided optimization) builds. I am receiving the exact same error message on math/libjbigi (which is now marked broken because of this). It is not just recompiling with -fPIC. That did not fix math/libjbigi. /usr/bin/ld: /usr/lib/libgcov.a(_gcov_one_value_profiler.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC Unfortunately, I do not have an amd64 FBSD install to pursue this one. I am not even sure how to begin. We might need someone knowledgeable on the gcc build toolchain. My suggestion would be (perhaps) checking math/libjibi 1st. It could be an easier target (very small build). We could fix that one 1st then try the same fix on lang/ruby18. However, I would require your assistance since I do not have a amd64 FBSD install. Incidentally, this is the exact same error message reported for the www/firefox3 PGO PR ports/132231. I am CCing the firefox3 maintainer so that he can follow this issue as well. Regards, Quoting Stanislav Sedov : > Hi, Mario! > > What's regarding the amd64 problem I asked before? Is it fixed? > If you missed the prvious email, I'm including it here. > > Begin forwarded message: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sat, 28 Feb 2009 09:19:26 -0300 > Mario Sergio Fujikawa Ferreira mentioned: > >> Hi, >> >> I did some work on the lang/ruby18 to enable Profile-Guided >> Optimization (PGO) build support. >> >> What I did? (Steps 1-4 handled by pgo port target). >> >> ------- RECIPE >> 1) Compile everything with CFLAGS/LDFLAGS containing >> '-fprofile-generate'; >> >> 2) Run lots of test cases to generate profiling information >> (make check); >> >> 3) Remove all binaries leaving only the profiling information behind; >> >> 4) Replace all instances of '-fprofile-generate' with >> '-fprofile-use'; >> >> 5) Re-compile everything using the profiling information. >> ------- >> >> If I did it correctly, you should not notice any differences >> on port usage aside from PGO option and a huge build compilation >> time. Please, verify if you can that I did all steps of the "RECIPE" >> correctly. >> >> I am not a ruby expert so I would like input on this one: >> >> 1) Does it perform better than ruby18 compiled without PGO? >> Hard number benchmarks welcome. Check >> http://github.com/acangiano/ruby-benchmark-suite/tree/master >> >> 2) Also, could others run specification conformance >> verification checks on the resulting ruby interpreter? >> So that we have multiple cross verification. Perhaps, >> with rubyspec? >> >> I hope you find this useful and that it performs as expected. >> I want to go after lang/ruby19. Perhaps, even python and perl5. >> >> The modified port file can be found at >> >> http://people.freebsd.org/~lioux/ruby18-pgo-2009022800.tbz[1] >> >> but the patch is so small that I have it as an attachment. >> >> Regards, >> >> -- >> Mario S F Ferreira - DF - Brazil - "I guess this is a signature." >> feature, n: a documented bug | bug, n: an undocumented feature >> >> >> !DSPAM:49a92be2967008612027430! >> > > Hi! > > Thanks for a great work. I'll look which benchmark suite I can intergrate > into the port to profile ruby more precisely. > > BTW, is it supposed to work on amd64? I'm receiving the following: > cc -shared -fprofile-generate -Wl,-soname,libruby18.so.18 array.o > bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o > error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o > math.o numeric.o object.o pack.o parse.o process.o prec.o > random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o > string.o struct.o time.o util.o variable.o version.o dmyext.o > -lcrypt -lm -rpath=/usr/lib:/usr/local/lib -pthread -o > libruby18.so.18 > /usr/bin/ld: /usr/lib/libgcov.a(_gcov_one_value_profiler.o): > relocation R_X86_64_32 can not be used when making a shared object; > recompile with -fPIC > /usr/lib/libgcov.a: could not read symbols: Bad value > *** Error code 1 > > Guess we need a PIC version of gcov... > > - -- > Stanislav Sedov > ST4096-RIPE > -----BEGIN PGP SIGNATURE----- > > iEYEARECAAYFAknbEa4ACgkQK/VZk+smlYFL+wCeKNM6sCjKnvrmlJ/xvIui5bI1 > jH4Anizk6Apf3DZHIdbi5YXpiX5HRuT3 > =L3b3 > -----END PGP SIGNATURE----- > > Best regards, > -- > Stanislav Sedov > ST4096-RIPE > > -- Mario S F Ferreira - DF - Brazil - "I guess this is a signature." feature, n: a documented bug | bug, n: an undocumented feature Links: ------ [1] http://people.freebsd.org/%7Elioux/ruby18-pgo-2009022800.tbz