# gcc 4.8 package does not create a symlink bin/cc

XMLWordPrintable

#### Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
2
• Sprint:
Science Pipelines DM-S15-5
• Team:

#### Description

I created a new lsst package named "gcc" that contains Mario's gcc 4.8 package. I used it to build lsst_distrib on lsst-dev and it worked just fine. Unfortunately the package does not include bin/cc (which should be a symlink to bin/gcc), and this is wanted because the LSST build system uses cc to build C code.

The desired fix is to modify the installer to make a symlink bin/cc that points to bin/gcc.

#### Activity

Hide
Russell Owen added a comment -

If you have time, please review my small change to your package.

The change is on tickets/DM-3126 of git@github.com:lsst/gcc.git

Show
Russell Owen added a comment - If you have time, please review my small change to your package. The change is on tickets/ DM-3126 of git@github.com:lsst/gcc.git
Hide
Kian-Tat Lim added a comment -

Is this the real solution? I think the problem might instead be in sconsUtils state.py.

Show
Kian-Tat Lim added a comment - Is this the real solution? I think the problem might instead be in sconsUtils state.py.
Hide
Mario Juric added a comment -

Russell Owen, looks good (technically, you should protect $PREFIX with " ", but EUPS would already break in presence of spaces in$PREFIX0.

Kian-Tat Lim, this is to enable gcc to serve as a drop-in for eupspkg – eupspkg (by default) looks for c+ and cc for the C+ and C compiler, respectively. For some reason, g++ installs the c++ alias to itself (hardlink really), but gcc does not do the same for cc (not sure why).

Show
Mario Juric added a comment - Russell Owen , looks good (technically, you should protect $PREFIX with " ", but EUPS would already break in presence of spaces in$PREFIX0. Kian-Tat Lim , this is to enable gcc to serve as a drop-in for eupspkg – eupspkg (by default) looks for c+ and cc for the C + and C compiler, respectively. For some reason, g++ installs the c++ alias to itself (hardlink really), but gcc does not do the same for cc (not sure why).
Hide
Russell Owen added a comment -

K-T: the way our software builds gcc results in a bin is missing "cc". I'm not sure how sconsUtils state.py might be related to that. Can you please expand on your comment?

Show
Russell Owen added a comment - K-T: the way our software builds gcc results in a bin is missing "cc". I'm not sure how sconsUtils state.py might be related to that. Can you please expand on your comment?
Hide
Kian-Tat Lim added a comment -

My bad; I forgot that eupspkg overrides what sconsUtils does by setting CC (and then using "cc=$CC"). I had thought that sconsUtils might be mixing up the compiler detection. Show Kian-Tat Lim added a comment - My bad; I forgot that eupspkg overrides what sconsUtils does by setting CC (and then using " cc=$CC "). I had thought that sconsUtils might be mixing up the compiler detection.
Hide
Russell Owen added a comment -

I've made all requested changes. Can you please close the review so I can merge to master?

Show
Russell Owen added a comment - I've made all requested changes. Can you please close the review so I can merge to master?
Hide
Mario Juric added a comment -

Can you close it? Looks like the mobile interface to JIRA doesn't let me do that and I'll be away from laptop for a few hours.

Show
Mario Juric added a comment - Can you close it? Looks like the mobile interface to JIRA doesn't let me do that and I'll be away from laptop for a few hours.
Hide
Mario Juric added a comment -

Show
Hide
Russell Owen added a comment -

Merge to master. Now...how to make this usable by others?

The main thing is to allow "eups distrib install" to build things using this gcc without a lot of fuss on the user's part.

I would also help to add gcc to repos.yaml in lsstsw, so a user can "rebuild gcc". However, few people use lsstsw and I have no idea how to make Jenkins optionally build with this gcc, so this would not take us very far.

Show
Russell Owen added a comment - Merge to master. Now...how to make this usable by others? The main thing is to allow "eups distrib install" to build things using this gcc without a lot of fuss on the user's part. I would also help to add gcc to repos.yaml in lsstsw, so a user can "rebuild gcc". However, few people use lsstsw and I have no idea how to make Jenkins optionally build with this gcc, so this would not take us very far.
Hide
Tim Jenness added a comment -

Right, you don't want anything to happen if a modern enough compiler is already available.

Show
Tim Jenness added a comment - Right, you don't want anything to happen if a modern enough compiler is already available.
Hide
Mario Juric added a comment -

I think this package is in the same category as anaconda – it's not linked anywhere in the dependency chain, it's provided as a courtesy to those who try to develop on systems that are too old and cannot get an updated compiler otherwise.

At best, it should go into newinstall.sh – some code along the lines of "we've noticed you don't have gcc >= 4.8... it'd be really, really, really preferable and great if your sysadmin could install it... if they can't, we'll try building one for you."

Show
Mario Juric added a comment - I think this package is in the same category as anaconda – it's not linked anywhere in the dependency chain, it's provided as a courtesy to those who try to develop on systems that are too old and cannot get an updated compiler otherwise. At best, it should go into newinstall.sh – some code along the lines of "we've noticed you don't have gcc >= 4.8... it'd be really, really, really preferable and great if your sysadmin could install it... if they can't, we'll try building one for you."
Hide
Kian-Tat Lim added a comment -

+1 to Mario's comment.

Show
Kian-Tat Lim added a comment - +1 to Mario's comment.

#### People

Assignee:
Russell Owen
Reporter:
Russell Owen
Reviewers:
Mario Juric
Watchers:
Frossie Economou, Joshua Hoblitt, Kian-Tat Lim, Mario Juric, Russell Owen, Tim Jenness