-
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
Problem building with module-loaded compiler #6
Comments
So, this is interesting. All the LLNL custom gcc installs use either static dependency libraries, or they rely on the system dependency libraries (libmpfr, etc). The idea with Spack is that things like LD_LIBRARY_PATH should not matter, and moreover that they shouldn't interfere with the package build. I blow away LD_LIBRARY_PATH and populate it with /lib and /lib64 locations only of dependencies during a spack build. I also add RPATHs for all the dependencies to the compile line. If I include your LD_LIBRARY_PATH, I run the risk of polluting the package build with gcc's dependencies. What if gcc itself builds a binary that depends on mpfr? For example, when Spack builds gcc, it actually bakes in the dependency RPATHs using its cc wrapper. I can't do that with external compilers, but I definitely want to support external compilers. Would it be reasonable to record the LD_LIBRARY_PATH on "spack compiler add" and to use that particular one to invoke the real gcc from within spack's cc? That would keep LD_LIBRARY_PATH out of the build environment and out of test runs (e.g., in configure) during the build. When the build invokes Spack's cc, it makes sure to use the LD_LIBRARY_PATH needed by the compiler. Does that seem reasonable? |
Wouldn't it be sufficient simply to prepend Spack's dependencies before the existing I don't know how Spack decides what to include in each generated executable's RPATH, but I'd think that properly ordering — Scott |
Not exactly -- if I do as you suggest, what happens when I unload the module? The user should still be able to build thing with, say, %gcc@4.8.3 and have it work. If I rely on modules, it won't. I could simplify implementation by putting compiler LD_LIBRARY_PATHs last in the environment and not bothering with passing them to wrappers to be set only when compilers run, but I still think I have to remember the LD_LIBRARY_PATH per compiler... |
Hi, I'm just posting this comment because I found the same problem and I'm interested in knowing if this is already solved somehow or is planned to be in a future version. @tgamblin Your solution seems reasonable to me. I understand that solving it that way would allow to load/unload the compiler module without affecting to the builds made with it previously, am I right? |
This issue is still being reported: |
Also see #332. |
Fixed by #2279. |
The issue is described in depth [here][desc]. C++14 no longer allows implicit conversion from iostream classes to void*. This patch comes directly from [PR spack#6][patch]. [desc]: http://stackoverflow.com/questions/38659115/make-fails-with-error-cannot-convert-stdistream-aka-stdbasic-istreamchar [patch]: agordon/libgtextutils#6
* New gcc uses C++14 mode, this fixes implicit conversion The issue is described in depth [here][desc]. C++14 no longer allows implicit conversion from iostream classes to void*. This patch comes directly from [PR #6][patch]. [desc]: http://stackoverflow.com/questions/38659115/make-fails-with-error-cannot-convert-stdistream-aka-stdbasic-istreamchar [patch]: agordon/libgtextutils#6 * mend
* New gcc uses C++14 mode, this fixes implicit conversion The issue is described in depth [here][desc]. C++14 no longer allows implicit conversion from iostream classes to void*. This patch comes directly from [PR spack#6][patch]. [desc]: http://stackoverflow.com/questions/38659115/make-fails-with-error-cannot-convert-stdistream-aka-stdbasic-istreamchar [patch]: agordon/libgtextutils#6 * mend
* New gcc uses C++14 mode, this fixes implicit conversion The issue is described in depth [here][desc]. C++14 no longer allows implicit conversion from iostream classes to void*. This patch comes directly from [PR spack#6][patch]. [desc]: http://stackoverflow.com/questions/38659115/make-fails-with-error-cannot-convert-stdistream-aka-stdbasic-istreamchar [patch]: agordon/libgtextutils#6 * mend
* New gcc uses C++14 mode, this fixes implicit conversion The issue is described in depth [here][desc]. C++14 no longer allows implicit conversion from iostream classes to void*. This patch comes directly from [PR spack#6][patch]. [desc]: http://stackoverflow.com/questions/38659115/make-fails-with-error-cannot-convert-stdistream-aka-stdbasic-istreamchar [patch]: agordon/libgtextutils#6 * mend
* New gcc uses C++14 mode, this fixes implicit conversion The issue is described in depth [here][desc]. C++14 no longer allows implicit conversion from iostream classes to void*. This patch comes directly from [PR #6][patch]. [desc]: http://stackoverflow.com/questions/38659115/make-fails-with-error-cannot-convert-stdistream-aka-stdbasic-istreamchar [patch]: agordon/libgtextutils#6 * mend
* New gcc uses C++14 mode, this fixes implicit conversion The issue is described in depth [here][desc]. C++14 no longer allows implicit conversion from iostream classes to void*. This patch comes directly from [PR #6][patch]. [desc]: http://stackoverflow.com/questions/38659115/make-fails-with-error-cannot-convert-stdistream-aka-stdbasic-istreamchar [patch]: agordon/libgtextutils#6 * mend
/cc @louisvernon @rspavel |
@junghans could you expand on #6 (comment)? For example if you are getting the exact same error as #6 (comment) it would be good to know that (along with additional details e.g. relevant entries from |
This was reopened by @junghans as we unclear on how #2279 fixes the originally described issue. What is the current expected behavior for a compiler which requires the setting of LD_LIBRARY_PATH? If the expectation is to explicitly manage the environment through customization of compilers.yaml, how does this relate to #2279? |
@louisvernon thanks for the extra info. @tgamblin FYI
Prior to #5599 (merged last week)
Sorry I'm lacking the context for this one. Is this related to desired behavior not yet available or expected behavior that is not working? |
Closing as outdated |
Revert commits accidentally included in merge branch.
* satsuma2: new package (#4838) * salmon: new package (#4833) * New Package: C-Ares (#4840) Adds the c-ares library, a C library for asynchronous DNS requests. Required for the google gRPC library. * sickle: new package (#4851) * seqprep: new package (#4850) * smalt: new package (#4853) * singularity: new package (#4852) * lmdb: Update to 0.9.21 (#4830) Convert to MakefilePackage and add pkg-config file. * added new pruners-ninja version (#4859) * sortmerna: new package (#4866) * revbayes: trying this again (#4861) * new package: miniGMG (#4849) * new package: miniGMG * changed based on comments * removed cuda version * sparta: new package (#4867) * sparta: new package * fixing homepage * Savanna (#4856) Installing the stable version 0.5 through the checksummed tar.gz does not fetch the git submodule in the package. The submodule appears as an empty directory. Thus, clone the commit tagged as v0.5 using git to get around this issue * savanna: modified adios dependency spec * Replaced adios+staging with adios+flexpath+dataspaces * savanna: Enabling fortran support in adios by default * savanna: reverting to variant 'staging' for enabling all staging transports * Make testing spack commands simpler (#4868) Adds SpackCommand class allowing Spack commands to be easily in Python Example usage: from spack.main import SpackCommand info = SpackCommand('info') out, err = info('mpich') print(info.returncode) This allows easier testing of Spack commands. Also: * Simplify command tests * Simplify mocking in command tests. * Simplify module command test * Simplify python command test * Simplify uninstall command test * Simplify url command test * SpackCommand uses more compatible output redirection * gBenchmark: Development Package (#4847) * gBenchmark: Development Package Add the development version (master branch) of `gBenchmark` * gBenchmark: Remove Duplicate Remove duplicate `gbenchmark` library and keep its patch to remove the shipped -Werror * Perl - allow package activation without PERL5LIB variable (#4540) * perl: prepend default perl @inc path to support package activation * perl: remove stray comma from list of configure arguments * perl: final comma in configure arguments makes adding arguments safer This reverts commit fdc10cd. * perl: add comment about modified @inc (thanks to George Hartzell) * perl: use self.prefix.lib and self.prefix.bin for clarity * perl: convert tabs added by editor to spaces for flake8 * perl: use new path syntax: prefix.lib.perl5 * perl: avoid line break before binary operator * perl: use compact spack syntax for perl executable * fix sphinx dependencies, add v1.6.3 (#4870) * Add cuda variant for mvapich2. (#4800) * Add cuda variant for mvapich2. * Disable cuda for mvapich2 by default. * Add a py-theano version from git repo (#4871) * Change Version formatting properties and functions to return Version objects (#4834) * Change version.up_to() to return Version() object * Add unit tests for Version.up_to() * Fix packages that expected up_to() to return a string * Ensure that up_to() preserves separator characters * Use version indexing instead of up_to * Make all Version formatting properties return Version objects * Update docs * Tests need to test string representation * stringtie: new package (#4878) * added new version of cdo (#4877) * subread: new package (#4882) * structure: new package (#4879) * structure: new pacakge * fixing package structure (not a pun) * swarm: new package (#4885) * added new version of jdk 8u141-b15 (#4876) * stacks: new package (#4875) * fix GobjectIntrospection on Darwin (#4872) * fix GobjectIntrospection on Darwin * minor
…evelop * commit 'da8427ea74396be4298d936897b7b76468310094': py-msmtools: New package. Dependency of `PKG-4`.
Don't use version suffix to distinguish among compilers
Spack install can't find shared libraries when using intel compilers |
Create buildcache fetch tce
…ecov/codecov-action-1.5.2 build(deps): bump codecov/codecov-action from 1.5.0 to 1.5.2
Bug fix for findutils: apply nonnull.patch only for versions 4.8.0+
Update/pennylane lightning
1. support version 3.1.3, which now depends on sundials@6 2. support version 3.1.2:, which broke the two patch files and therefore the two patch files have been replaced by more flexible filter_file() commands inside a patch() function. 3. rename the variant for python extension from using the package name "+pyuqtk" to the more standard "+python" 4. add maintainers @omsai and the upstream developer @bjdebus who offered to help with the spack packaging. 5. swig should only be a build-time dependency. swig is only necessary until @:3.1.0 6. confirmed python dependencies are correct by inspecting imports, subset python dependencies type to build, run, and confirmed all 31 build-time tests pass including the 9 python tests: ```console $ spack env create uqtk-dev $ spack add uqtk@3.1.3 $ spack install --test root && cat $(spack location -i uqtk)/.spack/install-time-test-log.txt ==> Testing package uqtk-3.1.3-nok6fut ==> [2023-04-19-14:56:25.005361] Running build-time tests ==> [2023-04-19-14:56:25.005536] RUN-TESTS: build-time tests [check] ==> [2023-04-19-14:56:25.009543] '/home/omsai/src/spack/opt/spack/linux-pureos10-skylake/gcc-10.2.1/gmake-4.4.1-b6g4apmfvxz3bn4eabh37dehcrg65fj7/bin/make' '-j4' '-n' 'test' ==> [2023-04-19-14:56:25.014903] '/home/omsai/src/spack/opt/spack/linux-pureos10-skylake/gcc-10.2.1/gmake-4.4.1-b6g4apmfvxz3bn4eabh37dehcrg65fj7/bin/make' '-j4' 'test' Running tests... /home/omsai/src/spack/opt/spack/linux-pureos10-skylake/gcc-10.2.1/cmake-3.26.3-zjmsfz23j5l4ytniz26uzvxonlu5qebr/bin/ctest --force-new-ctest-process Test project /tmp/omsai/spack-stage/spack-stage-uqtk-3.1.3-nok6fut47h42cnaau7wkoohgqy5f2qqa/spack-build-nok6fut Start 1: ArrayReadAndWrite Start 2: ArrayDelColumn Start 3: Array1DMiscTest Start 4: Array2DMiscTest 1/31 Test #1: ArrayReadAndWrite ................ Passed 0.01 sec Start 5: ArraySortTest 2/31 Test #2: ArrayDelColumn ................... Passed 0.01 sec Start 6: MultiIndexTest 3/31 Test #3: Array1DMiscTest .................. Passed 0.01 sec Start 7: CorrTest 4/31 Test #4: Array2DMiscTest .................. Passed 0.01 sec Start 8: QuadLUTest 5/31 Test #5: ArraySortTest .................... Passed 0.02 sec Start 9: MCMC2dTest 6/31 Test #6: MultiIndexTest ................... Passed 0.01 sec Start 10: MCMCRandomTest 7/31 Test #8: QuadLUTest ....................... Passed 0.02 sec Start 11: MCMCNestedTest 8/31 Test #10: MCMCRandomTest ................... Passed 0.02 sec Start 12: Deriv1dTest 9/31 Test #12: Deriv1dTest ...................... Passed 0.01 sec Start 13: SecondDeriv1dTest 10/31 Test #13: SecondDeriv1dTest ................ Passed 0.01 sec Start 14: GradHessianTest 11/31 Test #11: MCMCNestedTest ................... Passed 0.03 sec Start 15: GradientPCETest 12/31 Test #14: GradHessianTest .................. Passed 0.01 sec Start 16: PCE1dTest 13/31 Test #15: GradientPCETest .................. Passed 0.01 sec Start 17: PCEImplTest 14/31 Test #16: PCE1dTest ........................ Passed 0.01 sec Start 18: PCELogTest 15/31 Test #18: PCELogTest ....................... Passed 0.01 sec Start 19: Hessian2dTest 16/31 Test #19: Hessian2dTest .................... Passed 0.01 sec Start 20: BCS1dTest 17/31 Test #20: BCS1dTest ........................ Passed 0.01 sec Start 21: BCS2dTest 18/31 Test #21: BCS2dTest ........................ Passed 0.01 sec Start 22: LowRankRegrTest 19/31 Test #22: LowRankRegrTest .................. Passed 0.01 sec Start 23: PyModTest 20/31 Test #17: PCEImplTest ...................... Passed 0.07 sec Start 24: PyArrayTest 21/31 Test #23: PyModTest ........................ Passed 0.08 sec Start 25: PyArrayTest2 22/31 Test #25: PyArrayTest2 ..................... Passed 0.30 sec Start 26: PyQuadTest 23/31 Test #24: PyArrayTest ...................... Passed 1.44 sec Start 27: PyBCSTest1D 24/31 Test #26: PyQuadTest ....................... Passed 1.68 sec Start 28: PyBCSTest2D 25/31 Test #27: PyBCSTest1D ...................... Passed 1.66 sec Start 29: PyBADPTest 26/31 Test #7: CorrTest ......................... Passed 3.43 sec Start 30: PyRegressionTest 27/31 Test #28: PyBCSTest2D ...................... Passed 1.50 sec Start 31: PyGalerkinTest 28/31 Test #9: MCMC2dTest ....................... Passed 3.90 sec 29/31 Test #29: PyBADPTest ....................... Passed 1.66 sec 30/31 Test #30: PyRegressionTest ................. Passed 1.72 sec 31/31 Test #31: PyGalerkinTest ................... Passed 1.63 sec 100% tests passed, 0 tests failed out of 31 Total Test time (real) = 5.35 sec ==> [2023-04-19-14:56:30.382797] '/home/omsai/src/spack/opt/spack/linux-pureos10-skylake/gcc-10.2.1/gmake-4.4.1-b6g4apmfvxz3bn4eabh37dehcrg65fj7/bin/make' '-j4' '-n' 'check' ==> [2023-04-19-14:56:30.385983] Target 'check' not found in Makefile ```
Add cmake flags for Apple-clang case to cover C/C++ and RELEASE/REWITHDEBINFO builds
I'm trying out spack for the first time and ran into trouble when I tried to install a package after loading a compiler with the
module
command:It looks like spack is discarding my
LD_LIBRARY_PATH
. Is there a way to tell it not to?— Scott
The text was updated successfully, but these errors were encountered: