Gentoo Archives: gentoo-user

From: daid kahl <daidxor@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] building pdftk (needs gcj)
Date: Mon, 22 Feb 2010 13:07:08
Message-Id: 3ac129341002220412j6cd1e66el3f2974e89a23734c@mail.gmail.com
In Reply to: Re: [gentoo-user] building pdftk (needs gcj) by daid kahl
1 On 22 February 2010 18:51, daid kahl <daidxor@×××××.com> wrote:
2 > On 22 February 2010 12:28, Michael P. Soulier <msoulier@×××××××××××××.ca> wrote:
3 >> So, I need pdftk to build some documents, so I emerge it and it tells me that
4 >> I need to update my USE flags and rebuild gcc with gcj support.
5 >
6 >> So, I do. I added gcj to my global make.conf and ran the emerge, and gcc was
7 >> rebuilt.
8 [snip]
9 >
10 > Clearly I think this is the latter case of rtfm.  And by read the fine
11 > manual, I mean read the emerge output you sent to me.
12 [snip]
13 > ~daid
14
15 Sorry, my conscience is getting the best of me, since in my mind
16 sending "rtfm" to the user list is one of the biggest "FU"s and can
17 only deter people from Gentoo.
18
19 I also don't rtfm a lot of them time, although I try to do my own best
20 before hitting the user list. But since the question has come up, I
21 will go through the important points, which are short.
22
23 Now gcc-config is a great tool. I have 6 gcc's installed, and I think
24 I want another one once I'm not being overworked this week. I'm not
25 saying you have use for more than one gcc yourself, but obviously you
26 have a need for using gcc-config.
27
28 So I find a gcc version I don't have installed as an example.
29
30 daid@flux ~ $ emerge =gcc-4.4.2
31
32 These are the packages that would be merged, in order:
33
34 Calculating dependencies... done!
35 [ebuild NS ] sys-devel/gcc-4.4.2 [3.4.6-r2, 4.1.2, 4.2.4-r1,
36 4.3.2-r3, 4.3.4, 4.4.3] USE="fortran gcj gtk mudflap multislot nls
37 nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -graphite
38 (-hardened) (-libffi) (-multilib) (-n32) (-n64) -nocxx -objc -objc++
39 -objc-gc -test -vanilla" 61,459 kB
40
41 Total: 1 package (1 in new slot), Size of downloads: 61,459 kB
42
43 Would you like to merge these packages? [Yes/No]
44
45 (please set EMERGE_DEFAULT_OPTS="--ask --verbose" in /etc/make.conf so
46 this is your standard output)
47
48 the part [ebuild ] tells you a lot of useful information. You should
49 never ever emerge a package without pretend or ask on it in my
50 opinion. Even when I did a world on ~x86 upgrade last week and it was
51 404 packages, I at least read every package name that was being
52 installed to look for red flags and other things I might care about
53 personally.
54
55 Now in this case we see [ebuild NS ] which means it is New and
56 Slotted. The slotted part is important, because it means that this
57 action will not remove the old package, and now you will have at least
58 two on the system. You need to run emerge --depclean to clean it, or
59 unmerge it yourself manually. (By the way, can someone remind me if
60 there is an easy way to keep depclean from cleaning gcc's? I kind of
61 recall that explicitly listing them in world doesn't work, but for the
62 most part I forget and just avoid depcleaning more than a few times a
63 year.)
64
65 If it was a rebuid as you said, then you'd have an R instead of and N.
66
67 It also says "1 in new slot" so please pretend/ask emerges and read
68 what it says before continuing the emerge, again.
69
70 For library access on gcc's, you don't need to change the compiler,
71 (I need this for some janky binaries I have that are hardlinking to
72 certain gcc libraries...ugh.) But if you want to *use* the compiler,
73 you need to sudo gcc-config # && source /etc/profile. Personally I
74 don't use && and I start typing source /etc/profile before gcc-config
75 is done because it's faster. Get the # from gcc-config -l instead of
76 typing the monstrosity portage suggested or evil of all evils, copy
77 and pasting what portage told you to do blindly (although that's
78 better than ignoring the advice or portage and complaining that
79 portage is misleading because your results didn't work because you
80 didn't follow what it said to do).
81
82 Please never tell me ever again that the build process in portage is
83 not automated (dude, you're installing source code with custom configs
84 ... please consider Linux From Scratch) or that Gentoo has mislead
85 anyone, unless like that actually somehow happens, which I highly
86 doubt. Have you ever tried using other package managers? What about
87 using them to build from source? On the topic but a rant, I wanted
88 gcc-3.4.6 on Mac OS since sometimes I boot into Mac OS and proceed to
89 rip the hair from my head.
90
91 Please see the 20 month old bug I encountered trying to build a
92 hardened gcc compiler, and also not that Mac OS does not ship with
93 *any* form of Fortran compiler.
94
95 Link: http://trac.macports.org/ticket/15838
96
97 Replies to the ticket (bugzilla) from people I can only pray are *not*
98 developers, on a bug for the package gcc34:
99
100 "Why do you need gcc34?"
101
102 "I do not know if it will be possible to make gcc 3.4 work on Leopard.
103 gcc 3.4 is very old. It will probably be a better use of your time to
104 update your software to work with gcc 4.3. For example the qemu port
105 has been updated to work with gcc4 on Leopard on Intel. See its
106 patches."
107
108 "As gcc34 does not compile on Tiger or Leopard, we should think about
109 removing the port."
110
111 Then they just talk about removing dependencies from macports to the
112 package, but the package was *still there* like a couple months ago.
113 And it does suck, but there is some stuff that wants to use g77
114 compilers and I don't personally I the time to recode this stuff.
115
116 I was bored trying to install Gentoo Prefix in Mac OS since at least
117 if I ever have to see Aqua's ugly face and get kicked repeatedly in
118 the shins by Darwin I will have portage. Do you realize that I could
119 find more bug hits / advice for errors encountered by Gentoo Prefix
120 *on Mac OS specifically* than I can ever find for either fink or
121 macports? That tells you something really, really crazy about life.
122 I actually want to put Gentoo Prefix over there and confirm that Mac
123 OS 10.5 can compile gcc-3.4.6 (or if not at least see what Gentoo says
124 about the error reports!) and then go post on this stupid bugzilla
125 they have.
126
127 If portage (or paludis, I haven't tried it yet but I really want to)
128 is not the single best package manager on the planet with the single
129 best user community supporting it, please advise.
130
131 ~daid