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

sidestep using the config.guess that comes with a package in ConfigureMake generic easyblock #1506

Merged
merged 33 commits into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
17d6c76
Sidestep using the config.guess that comes with a package
Sep 12, 2018
cd69782
Sidestep using the config.guess that comes with a package
Sep 13, 2018
fd6bdb7
Make the changes a bit more resilient
Sep 13, 2018
c47853a
Make it clearer why config.guess is there
Sep 13, 2018
ef81748
Address comments
Sep 13, 2018
6dcb5c1
Appease the hound
Sep 13, 2018
e120a44
Update README.md
Sep 13, 2018
5278326
Update README.md
Sep 13, 2018
5f8fda2
Update location of config.guess script
Sep 13, 2018
d7115ea
Update README.md
Sep 13, 2018
80a7a7b
Fix bug
Sep 13, 2018
a15fc10
Tidy up
Sep 13, 2018
2961ea7
Add a guard to ensure build type is only included when Autotools is l…
Sep 13, 2018
c49cd68
Make the config.guess update smarter
Sep 13, 2018
4994369
Appease the hound
Sep 13, 2018
2309b88
Tidy up
Sep 13, 2018
453dd1e
Add additional file exists guard
Sep 13, 2018
8ef7799
Address comments
Sep 14, 2018
28ff190
Retain check that configure script exists
Sep 14, 2018
ebb4e97
Be more careful!
Sep 14, 2018
e2c1f70
Use positive logic
Sep 14, 2018
e637804
Cosmetics
Sep 14, 2018
a434e86
Give a more explicit warning when no config.guess is found
Sep 14, 2018
2c68803
Add author
Sep 14, 2018
9f9d214
Allow us to strictly meet the exceptional licence terms of config.guess
Sep 14, 2018
754691f
Merge remote-tracking branch 'origin/config.guess' into config.guess
Sep 14, 2018
aa4d649
Update README.md
Sep 14, 2018
adfc4fc
Download config.guess on the fly (if possible)
Sep 21, 2018
7b85a0c
Appease the hound
Sep 21, 2018
6278426
more thorough logging on config.guess + code cleanup
boegel Sep 21, 2018
20a60c1
Merge pull request #14 from boegel/config.guess
Sep 21, 2018
5cfff14
ensure VERSION is defined in easybuild.easyblocks namespace in test_c…
boegel Sep 21, 2018
f9cb4de
Merge pull request #15 from boegel/config.guess
Sep 21, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion easybuild/easyblocks/generic/configuremake.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def extra_options(extra_vars=None):
'configure_cmd_prefix': ['', "Prefix to be glued before ./configure", CUSTOM],
'prefix_opt': [None, "Prefix command line option for configure script ('--prefix=' if None)", CUSTOM],
'tar_config_opts': [False, "Override tar settings as determined by configure.", CUSTOM],
'build_type': [None, "Type of system package is being configured for, e.g., x86_64-pc-linux-gnu (determined"
" by config.guess shipped with EasyBuild if None)", CUSTOM],
})
return extra_vars

Expand Down Expand Up @@ -83,11 +85,23 @@ def configure_step(self, cmd_prefix=''):
if prefix_opt is None:
prefix_opt = '--prefix='

cmd = "%(preconfigopts)s %(cmd_prefix)s./configure %(prefix_opt)s%(installdir)s %(configopts)s" % {
# Avoid using config.guess from the package as it is frequently out of date, use the version shipped with EB
build_type = self.cfg.get('build_type')
if build_type is None:
build_type, exit_code = run_cmd('config.guess')
if exit_code != 0:
raise EasyBuildError("config.guess shipped with EB could not determine build type: '%s'",

Choose a reason for hiding this comment

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

undefined name 'EasyBuildError'

Copy link
Member

Choose a reason for hiding this comment

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

@ocaisa No need for this, run_cmd check the exit code of the command that was run already by default, and will produce a clear error message when != 0.

So, you can use:

build_type, _ = run_cmd('config.guess')

(_ is often used to signal you're ignoring part of the return value)

build_type)
build_type = build_type.strip()
build_type_option = '--build=' + build_type

cmd = ("%(preconfigopts)s %(cmd_prefix)s./configure %(prefix_opt)s%(installdir)s %(build_type_option)s "
Copy link
Member

Choose a reason for hiding this comment

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

@ocaisa I like the cmd = ' '.join([...]) option better, there's little point in using a dict here to format the command...

"%(configopts)s") % {
'preconfigopts': self.cfg['preconfigopts'],
'cmd_prefix': cmd_prefix,
'prefix_opt': prefix_opt,
'installdir': self.installdir,
'build_type_option': build_type_option,
'configopts': self.cfg['configopts'],
}

Expand Down
Loading