public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] [OT] Questions about building from source tarball
@ 2012-10-30  8:56 Walter Dnes
  2012-10-30 17:24 ` Michael Orlitzky
  2012-10-31  0:26 ` [gentoo-user] " walt
  0 siblings, 2 replies; 6+ messages in thread
From: Walter Dnes @ 2012-10-30  8:56 UTC (permalink / raw
  To: Gentoo Users List

  Several years ago, back in the days of Mozilla 0.9x and Phoenix, I
used to build Mozilla and/or Pheonix from the source tarball.  I've been
using Gentoo for years, and I've forgotten a lot about building manually
from source.  I asked this question on mozillazine.org, but no answers
yet.  Hopefully, I can get some help here.  I'm looking at
https://developer.mozilla.org/en-US/docs/Simple_SeaMonkey_build and I
have a few questions...

1) What options do I need to set to make Seamonkey (or Firefox) build
in, and run from, a local dir, e.g. "${HOME}/seamonkey"?  Something to
do with "prefix" and "exec-prefix"?  I'd prefer to avoid jumping to root
for the install.  And throwing in files in /usr that portage doesn't
know about, is begging for trouble.

2) I read the instructions on how to pass the "O2" flag to the make and
compile process. What about the rest of the CFLAGS line?  My CFLAGS are

CFLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables"

  For those who are wondering, I want to tweak it well beyond what the
Gentoo ebuild allows.  And I'll be doing some experimentation, so I
couldn't specify what I want right now.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] [OT] Questions about building from source tarball
  2012-10-30  8:56 [gentoo-user] [OT] Questions about building from source tarball Walter Dnes
@ 2012-10-30 17:24 ` Michael Orlitzky
  2012-10-31  0:26 ` [gentoo-user] " walt
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Orlitzky @ 2012-10-30 17:24 UTC (permalink / raw
  To: gentoo-user

On 10/30/2012 04:56 AM, Walter Dnes wrote:
>   Several years ago, back in the days of Mozilla 0.9x and Phoenix, I
> used to build Mozilla and/or Pheonix from the source tarball.  I've been
> using Gentoo for years, and I've forgotten a lot about building manually
> from source.  I asked this question on mozillazine.org, but no answers
> yet.  Hopefully, I can get some help here.  I'm looking at
> https://developer.mozilla.org/en-US/docs/Simple_SeaMonkey_build and I
> have a few questions...
> 
> 1) What options do I need to set to make Seamonkey (or Firefox) build
> in, and run from, a local dir, e.g. "${HOME}/seamonkey"?  Something to
> do with "prefix" and "exec-prefix"?  I'd prefer to avoid jumping to root
> for the install.  And throwing in files in /usr that portage doesn't
> know about, is begging for trouble.
> 

Most of the configuration directives reference the PREFIX by default.
This is from GNU tar, but FF is probably the same:

  Installation directories:
  --prefix=PREFIX         ... [/usr/local]
  --exec-prefix=EPREFIX   ... [PREFIX]

  Fine tuning of the installation directories:
    --bindir=DIR            ... [EPREFIX/bin]
    --sbindir=DIR           ... [EPREFIX/sbin]
    ...

So by default, everything eventually references PREFIX, which defaults
to /usr/local. You can change PREFIX to be e.g. ~/local/ and the rest
should wind up in subdirectories of that. Just double check to make sure
all of the FF defaults refer back to PREFIX.


> 2) I read the instructions on how to pass the "O2" flag to the make and
> compile process. What about the rest of the CFLAGS line?  My CFLAGS are
> 

I use this in my ~/.bashrc:

  # Grab CFLAGS, etc. from make.conf.
  . /etc/portage/make.conf

  # LDFLAGS comes from.. somewhere else.
  LDFLAGS="-Wl,-O1 -Wl,--as-needed"

  # Portage does this for us.
  MAKE="make ${MAKEOPTS}"

If anyone knows of a slicker way to do LDFLAGS, I'd like to know.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gentoo-user] Re: [OT] Questions about building from source tarball
  2012-10-30  8:56 [gentoo-user] [OT] Questions about building from source tarball Walter Dnes
  2012-10-30 17:24 ` Michael Orlitzky
@ 2012-10-31  0:26 ` walt
  2012-11-01  0:29   ` Walter Dnes
  1 sibling, 1 reply; 6+ messages in thread
From: walt @ 2012-10-31  0:26 UTC (permalink / raw
  To: gentoo-user

On 10/30/2012 01:56 AM, Walter Dnes wrote:
>    Several years ago, back in the days of Mozilla 0.9x and Phoenix, I
> used to build Mozilla and/or Pheonix from the source tarball.

Me too :)  Every morning I'd pull from their source repo and build my own
and then file bug reports (there were thousands of bugs to report) until
I got tired of adding to the mile-high stack of other ignored bug reports
and quit.  Amazing how much I've forgotten since then :(

https://developer.mozilla.org/en-US/docs/Configuring_Build_Options

About halfway down that webpage I spotted this line, and it rang a bell:
ac_add_options --enable-optimize=-O2
(I think I recall adding CFLAGS to that line, but it's pretty fuzzy now.

And you would probably want to set this to $HOME, as you mentioned:
ac_add_options --prefix=/usr

You can also add mk_add_options="-j4" and similar stuff to .mozconfig
if you want.

You can try entering 'about:buildconfig' in firefox or seamonkey to see
what sort of stuff the mozilla devs use to build their own binaries.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Re: [OT] Questions about building from source tarball
  2012-10-31  0:26 ` [gentoo-user] " walt
@ 2012-11-01  0:29   ` Walter Dnes
  2012-11-02  3:33     ` David Relson
  0 siblings, 1 reply; 6+ messages in thread
From: Walter Dnes @ 2012-11-01  0:29 UTC (permalink / raw
  To: gentoo-user

  Thanks for the pointer.  It got me going... sort of.  Now I know why
we don't have the latest seamonkey in the Gentoo tree.  It requires
>=dev-libs/nspr-4.9.3 and the highest ebuild of nspr in the tree is
4.9.2, even though I did an "emerge sync" today.  So I'd have to build
nspr and nss locally from tarballs, and then set .mozconfig's
nspr-prefix and nss-prefix to the local copy... bleagh.  I'll just wait
until nspr gets at least a keyworded 4.9.3 in the tree.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Re: [OT] Questions about building from source tarball
  2012-11-01  0:29   ` Walter Dnes
@ 2012-11-02  3:33     ` David Relson
  2012-11-02  9:14       ` Neil Bothwick
  0 siblings, 1 reply; 6+ messages in thread
From: David Relson @ 2012-11-02  3:33 UTC (permalink / raw
  To: gentoo-user

In the past when I wanted/needed a newer version of a package than is
in portage, I'd create an entry in /usr/local/portage.

For example for app-example/some-package/some-package.x.y.z.ebuild, I'd

1) create directory /usr/local/portage/app-example/some-package
2) copy some-package.x.y.z.ebuild to some-package.x.y.z-r1.ebuild (in the
new directory).  
3) Some editing of the new ebuild might be needed here...
4) Run "ebuild ... digest" on the new ebuild to create the Manifest
file.
5) test with "ebuild ... compile" or "emerge some-package".
6) when errors are encountered, repeat steps 3, 4, and 5.

HTH,

David
 

On Wed, 31 Oct 2012 20:29:10 -0400
Walter Dnes wrote:

>   Thanks for the pointer.  It got me going... sort of.  Now I know why
> we don't have the latest seamonkey in the Gentoo tree.  It requires
> >=dev-libs/nspr-4.9.3 and the highest ebuild of nspr in the tree is
> 4.9.2, even though I did an "emerge sync" today.  So I'd have to build
> nspr and nss locally from tarballs, and then set .mozconfig's
> nspr-prefix and nss-prefix to the local copy... bleagh.  I'll just
> wait until nspr gets at least a keyworded 4.9.3 in the tree.
> 
> -- 
> Walter Dnes <waltdnes@waltdnes.org>
> I don't run "desktop environments"; I run useful applications


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Re: [OT] Questions about building from source tarball
  2012-11-02  3:33     ` David Relson
@ 2012-11-02  9:14       ` Neil Bothwick
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Bothwick @ 2012-11-02  9:14 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 582 bytes --]

On Thu, 1 Nov 2012 23:33:44 -0400, David Relson wrote:

> 1) create directory /usr/local/portage/app-example/some-package
> 2) copy some-package.x.y.z.ebuild to some-package.x.y.z-r1.ebuild (in
> the new directory).  
> 3) Some editing of the new ebuild might be needed here...

Some files in the files directory may also be needed (init scripts,
patches etc.) I prefer to copy the whole ebuild directory from $PORTDIR to
my overlay, rename the current ebuild and delete the older ones, leaving
files/ untouched.


-- 
Neil Bothwick

Home is where you hang your @.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-02  9:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-30  8:56 [gentoo-user] [OT] Questions about building from source tarball Walter Dnes
2012-10-30 17:24 ` Michael Orlitzky
2012-10-31  0:26 ` [gentoo-user] " walt
2012-11-01  0:29   ` Walter Dnes
2012-11-02  3:33     ` David Relson
2012-11-02  9:14       ` Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox