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

cmm-sources are not included in shared object linking #7182

Closed
bgamari opened this issue Nov 26, 2020 · 0 comments · Fixed by #7252
Closed

cmm-sources are not included in shared object linking #7182

bgamari opened this issue Nov 26, 2020 · 0 comments · Fixed by #7252

Comments

@bgamari
Copy link
Contributor

bgamari commented Nov 26, 2020

Describe the bug
cmm-sources objects are not linked into shared objects.

To Reproduce
Steps to reproduce the behavior:

$ cd Cabal/cabal-testsuite/PackageTests/CmmSources
$ cabal v2-build --enable-executable-dynamic
Resolving dependencies...
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
 - cmmexperiment-0 (exe:demo) (first run)
Preprocessing executable 'demo' for cmmexperiment-0..
Building executable 'demo' for cmmexperiment-0..
Linking /opt/exp/ghc/ghc-landing/libraries/Cabal/cabal-testsuite/PackageTests/CmmSources/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cmmexperiment-0/x/demo/build/demo/demo ...
/opt/exp/ghc/ghc-landing/libraries/Cabal/cabal-testsuite/PackageTests/CmmSources/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cmmexperiment-0/build/libHScmmexperiment-0-inplace-ghc8.8.3.so: error: undefined reference to 'aToMyWordzh'
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)

Please use version-prefixed commands (e.g. v2-build or v1-build) to avoid ambiguity.

Expected behavior
A runnable executable should be producd.

System information

Additional context
Add any other context about the problem here.

bgamari added a commit to bgamari/cabal that referenced this issue Nov 26, 2020
Previously we neglected to include such objects.

Fixes haskell#7182.
mpickering pushed a commit to mpickering/cabal that referenced this issue Jan 19, 2021
Previously we neglected to include such objects.

Fixes haskell#7182.
hololeap pushed a commit to hololeap/cabal that referenced this issue Apr 24, 2022
Previously we neglected to include such objects.

Fixes haskell#7182.
hololeap pushed a commit to hololeap/cabal that referenced this issue Apr 24, 2022
Previously we neglected to include such objects.

Fixes haskell#7182.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant