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

LLVM 9.0.1 Symbol Not Found #394

Open
shterrett opened this issue Apr 20, 2022 · 1 comment
Open

LLVM 9.0.1 Symbol Not Found #394

shterrett opened this issue Apr 20, 2022 · 1 comment

Comments

@shterrett
Copy link

Perhaps similar to #391

I see the following

[nix-shell:~/src/llvm-playground]$ llvm-config --version
9.0.1

[nix-shell:~/src/llvm-playground]$ cabal build
Warning: The package list for 'hackage.haskell.org' is 15 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
 - llvm-hs-9.0.1 (lib:llvm-hs) (requires build)
 - llvm-playground-0.1.0.0 (lib) (first run)
 - llvm-playground-0.1.0.0 (exe:llvm-playground) (first run)
Starting     llvm-hs-9.0.1 (all, legacy fallback)

Failed to build llvm-hs-9.0.1. The failure occurred during the configure step.
Build log ( /Users/stuart/.cabal/logs/ghc-8.10.7/llvm-hs-9.0.1-91f420dc.log ):
[1 of 1] Compiling Main             ( /Users/stuart/src/llvm-playground/dist-newstyle/tmp/src-34564/llvm-hs-9.0.1/dist/setup/setup.hs, /Users/stuart/src/llvm-playground/dist-newstyle/tmp/src-34564/llvm-hs-9.0.1/dist/setup/Main.o )
Linking /Users/stuart/src/llvm-playground/dist-newstyle/tmp/src-34564/llvm-hs-9.0.1/dist/setup/setup ...
Configuring llvm-hs-9.0.1...
dyld[34771]: Symbol not found: __ZN4llvm15SmallVectorBaseIjE8grow_podEPvmm
  Referenced from: /nix/store/dg9vlsv08b4vv4ilcgpys5224n3k71k8-clang-11.1.0/bin/clang-11
  Expected in: /nix/store/whi4456hcbsy5c4d9a1psljlxaarjh7n-llvm-9.0.1-lib/lib/libLLVM.dylib
`cc' failed in phase `C Compiler'. (Exit code: -6)
cabal: Failed to build llvm-hs-9.0.1 (which is required by exe:llvm-playground
from llvm-playground-0.1.0.0). See the build log above for details.

when trying to build what is basically the kaledioscope project. Cabal file

cabal-version:      2.4
name:               llvm-playground
version:            0.1.0.0

-- A short (one-line) description of the package.
-- synopsis:

-- A longer description of the package.
-- description:

-- A URL where users can report bugs.
-- bug-reports:

-- The license under which the package is released.
-- license:
author:             Stuart Terrett
maintainer:         shterrett@gmail.com

-- A copyright notice.
-- copyright:
-- category:
extra-source-files: CHANGELOG.md

common options
  build-depends:
    base >= 4.6 && <5.0,
    bytestring   >= 0.10,
    mtl          >= 2.2,
    containers   >= 0.5,
    llvm-hs      >= 9.0 && < 10.0,
    llvm-hs-pure >= 9.0 && < 10.0

library
    import: options
    exposed-modules:
      Codegen
      JIT

    -- Modules included in this library but not exported.
    -- other-modules:

    -- LANGUAGE extensions used by modules in this package.
    -- other-extensions:
    hs-source-dirs:   src
    default-language: Haskell2010

executable llvm-playground
    import: options
    main-is:          Main.hs

    -- Modules included in this executable, other than Main.
    -- other-modules:

    -- LANGUAGE extensions used by modules in this package.
    -- other-extensions:
    build-depends:
        llvm-playground

    hs-source-dirs:   src
    default-language: Haskell2010

@Memorytaco
Copy link

Try to setup LD_LIBRARY_PATH .

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

No branches or pull requests

2 participants