-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Added customization for make targets in 'build' and 'install' phases for CMakePackage #2742
Added customization for make targets in 'build' and 'install' phases for CMakePackage #2742
Conversation
Also allows AutotoolsPackages to be built in a different directory. Some packages like mozjs require this. All 3 build systems should be much more uniform now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have time later in the day to try this PR, but at a first glance I agree with all the changes.
Things may need to be made a little more robust. There are two situations I envision:
We should make sure that both work. |
@adamjstewart Do you know any relevant package that does 2? Because from this to have multiple |
|
@alalazo I got the |
2add86d
to
782d8b9
Compare
This introduces a strange new bug. When I configure
Looks like it was something in the 782d8b9 commit that caused this change. The only difference in the log file is that it now runs EDIT: I think the problem is that the build directory is a symlink, and it's trying to create a symlink from there, and it's running into an infinite loop of recursion. No idea how to prevent that. I'm surprised my change caused such a serious problem. EDIT: According to http://gumstix.8.x6.nabble.com/GNUmakefile-too-many-levels-symbolic-links-td665281.html, the problem may be because we are building in a symlinked directory:
|
Ok, I backed out the changes that allowed you to run a configure script in a different directory. I don't think absolute paths will work if the directory is symlinked, so we could possibly get away with relative paths, but I decided we don't need it enough right now. Confirmed that tcl and tk build with these changes. Building espressopp now. |
Tried building
I don't think this is related to my changes. @fedepad @junghans Any idea what is causing this to fail? |
@adamjstewart but the package itself is compiled ok (no doc)? Since what you report regards building of the doc, in particular the user doc. I never seen this on my machine but this sphinx-doc/sphinx#1684 seems to mention matplotlib should be installed since one of sphinx extension is using it...in this case we should add matplotlib as a dependencies when building user doc... @junghans Ideas? We could try that... |
@adamjstewart would you try adding the following lines: |
@junghans and because of the warning on numpy I wonder whether we need numpy too... |
I'll try that now. Btw, the changes I made require me to run the entire installation in serial, not just the documentation building steps. I'm not sure if that makes this change worth it for this particular package. Thoughts? |
Yes, |
No not worth it. Serial builds are maddeningly slow and take a noticeably
disproportionate fraction of the build time.
…On Jan 9, 2017 10:24 AM, "Adam J. Stewart" ***@***.***> wrote:
I'll try that now. Btw, the changes I made require me to run the entire
installation in serial, not just the documentation building steps. I'm not
sure if that makes this change worth it for this particular package.
Thoughts?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2742 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cdx1EO5hikzBJ2bMmcLLa_u7WEyPnks5rQlE5gaJpZM4LbGCr>
.
|
@adamjstewart I've experienced that building espressopp is usually kind of slow so I usually turn on a parallel build, which I highly suggest, so I'm not sure if it makes sense in this case, but maybe @junghans had other experience... @junghans Ok, then we need to update and add those dependencies I mentioned for building the docs ;) |
@fedepad: Yeah, parallel builds work in espresso++. Shouldn't spack build everything in parallel by default? |
Yes, but my changes replaced your I'll back out that particular change. I agree that building in parallel is way faster. I was able to confirm that my new |
@junghans you can configure it, whether parallel or serial. What @adamjstewart was referring to is that bringing the changes proposed in this PR to Espresso++ (with the modification proposed in one of the commits) will require to run a serial build. Did I understood correctly? |
Ok, with the latest commit, the package now builds in parallel. I added the numpy and matplotlib dependencies, and it gets farther in the documentation building steps, but now crashes with:
Must be some LaTeX package that's missing as a dependency. I think this PR is safe to merge now. I'll let @fedepad and @junghans work out the details of the documentation builds in another PR. |
@adamjstewart @junghans I might have an idea of what's going on. It might be doxygen using the new key pdfencoding in the hyperref latex package. So a probable solution might be to have an updated texlive and requiring the live version (the only one in spack). |
Aren't
I ran this on our cluster.
|
Ping @tgamblin |
""" | ||
return [] | ||
|
||
def cmake(self, spec, prefix): | ||
"""Run cmake in the build directory""" | ||
options = [self.root_cmakelists_dir()] + self.std_cmake_args + \ | ||
self.cmake_args() | ||
create = not os.path.exists(self.build_directory()) | ||
with working_dir(self.build_directory(), create=create): | ||
with working_dir(self.build_directory(), create=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamjstewart Will this work in case the build directory already exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I believe so. I'll have to check how we define working_dir
, but if I remember correctly it only creates the directory if it doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it calls mkdirp
, which does indeed check to see whether or not the directory exists first, so we can set create=True
and not worry.
Ping ping @tgamblin |
Does the exact same thing as #2464 but for
CMakePackage
.In #2602, @fedepad asked how to run custom build targets in
CMakePackage
. This PR adds that functionality. Forespressopp
, I believe this would look like: