Skip to content
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

give /lib preference over /lib64 & co, enable installation of libliberty by default #1030

Merged
merged 9 commits into from
Nov 13, 2016

Conversation

boegel
Copy link
Member

@boegel boegel commented Nov 11, 2016

See suggestion in #921 by @sebth on giving preference to /lib subdirectories, and #969 by @stachon suggesting to enable the installation of libiberty.

I'm going to test easybuilders/easybuild-easyconfigs#3776, easybuilders/easybuild-easyconfigs#3777 and easybuilders/easybuild-easyconfigs#3778 on top of this PR.

@boegel boegel added this to the v3.0 milestone Nov 11, 2016
@boegel
Copy link
Member Author

boegel commented Nov 11, 2016

two updates:

  • we can't enable libiberty by default for now, since it's not built with -fPIC which causes problems when building e.g. binutils with that GCC (@stachon: are you up for figuring this out?)
  • I added a custom easyconfig parameter prefer_lib_subdir that can be used to disable the patching of MULTILIB_OSDIRNAMES
  • patching of MULTILIB_OSDIRNAMES is disabled when the multilib easyconfig parameter is enabled, since it causes problems (it breaks building the GCC easyconfigs that have CLooG support enabled, cfr. https://gist.github.com/boegel/7a828f3370e8ebccee56e7e2f20b1e27)

@ocaisa
Copy link
Member

ocaisa commented Nov 11, 2016

It is possible to enable the libiberty default in binutils instead (that's what we do)

@boegel
Copy link
Member Author

boegel commented Nov 11, 2016

@ocaisa do you think it makes sense to always enable libiberty through the binutils easyblock (by default, we can provide an easyconfig parameter to disable it)?

@ocaisa
Copy link
Member

ocaisa commented Nov 11, 2016

I guess its a question of being consistent, if our defaults consistently only provide it in binutils then we should be safe...we could even bomb out of GCC if someone sets the configopt?

@boegel
Copy link
Member Author

boegel commented Nov 11, 2016

@ocaisa is binutils then by default built with -fPIC? Do you only pass --enable-install-libiberty when building binutils, or do you do more than that?

Also, why did you enable that exactly? What's the use case for libiberty?

@boegel
Copy link
Member Author

boegel commented Nov 12, 2016

@wpoely86, @geimer: thoughts on this? This seems to be working great, I'm very much keen on merging this in, unless there are any objections.

@geimer
Copy link
Contributor

geimer commented Nov 12, 2016

@boegel I was having some trouble with --enable-install-libiberty recently, though it may have been due to not setting up -fPIC correctly (especially in the dummy build which is used whenever you bild something for GCCcore and where you have to enable -fPIC manually). I have to try again, but won't have time for it until after SC...

@ocaisa
Copy link
Member

ocaisa commented Nov 13, 2016

Lgtm

@ocaisa
Copy link
Member

ocaisa commented Nov 13, 2016

...at least the libiberty part ;)

@ocaisa
Copy link
Member

ocaisa commented Nov 13, 2016

Missing a sanity check for libiberty in the binutils easyblock

@boegel
Copy link
Member Author

boegel commented Nov 13, 2016

Thanks for the review @ocaisa!

Tested this thoroughly using a large bunch of GCC rebuilds, and by rebuilding all existing binutils easyconfigs.

Going in!

@boegel boegel merged commit 535510d into easybuilders:develop Nov 13, 2016
@boegel boegel deleted the gcc_lib_lib64_libiberty branch November 13, 2016 16:05

if not os.path.exists(os.path.join(self.installdir, 'info', 'libiberty.texi')):
copy_file(os.path.join(self.cfg['start_dir'], 'libiberty', 'libiberty.texi'),
os.path.join(self.installdir, 'info', 'libiberty.texi'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this has been merged already: does it really make sense to install the .texi file? I thought that this is the input file for texinfo to generate the actual .info file to be installed...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocaisa was doing that too, but I don't mind cutting that out. Honestly, I didn't spend much time questioning it's usefulness. ;)

@ocaisa
Copy link
Member

ocaisa commented Nov 13, 2016

Its a long time since I first did this, not sure why I included that, I may have just searched for everything libiberty related...or I may have gone away and checked what was being installed with old binutils builds

cfgfile = 'gcc/config/i386/t-linux64'
multilib_osdirnames = "MULTILIB_OSDIRNAMES = m64=../lib:../lib64 m32=../lib:../lib32 mx32=../lib:../libx32"
self.log.info("Patching MULTILIB_OSDIRNAMES in %s with '%s'", cfgfile, multilib_osdirnames)
write_file(cfgfile, multilib_osdirnames, append=True)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebth it looks like this is causing problems with older GCC versions, i.e. GCC 4.7.2 and older (except for GCC 4.6.4)... GCC 4.7.3 and newer are OK.

This is the error:

/usr/lib/crti.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status

with:

$ file /usr/lib/crti.o
/usr/lib/crti.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped

I'll add a prefer_lib_subdir = False in those easyconfigs, but do you happen to know what the problem is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants