Skip to content

Linker error when used as a dependency #18

@Javran

Description

@Javran

Feel free to ask for more details, a minimal project setup here,
which does not work:

$ git clone https://gist.github.com/587dd0c7e5b6fe670686a8516da35173.git
$ cd 587dd0c7e5b6fe670686a8516da35173
$ stack build
Building all executables for `cpython-demo' once. After a successful build of all of them, only specified executables will be rebuilt.
cpython-demo> configure (exe)
Configuring cpython-demo-0.0.0...
cpython-demo> build (exe)
Preprocessing executable 'demo' for cpython-demo-0.0.0..
Building executable 'demo' for cpython-demo-0.0.0..
[1 of 2] Compiling Main
[2 of 2] Compiling Paths_cpython_demo
Linking .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/demo/demo ...
/home/xxx/.stack/snapshots/x86_64-linux-tinfo6/684b9a848f341018285ac518c1050e1ae49a4d51abeaa9fa60618eaf63ef089d/8.8.4/lib/x86_64-linux-ghc-8.8.4/cpython-3.5.1-2jjfSLelR2GLOBJAe0FX3T/libHScpython-3.5.1-2jjfSLelR2GLOBJAe0FX3T.a(CPython.o):function cpythonzm3zi5zi1zm2jjfSLelR2GLOBJAe0FX3T_CPython_endInterpreter1_info: error: undefined reference to 'Py_EndInterpreter'
/home/xxx/.stack/snapshots/x86_64-linux-tinfo6/684b9a848f341018285ac518c1050e1ae49a4d51abeaa9fa60618eaf63ef089d/8.8.4/lib/x86_64-linux-ghc-8.8.4/cpython-3.5.1-2jjfSLelR2GLOBJAe0FX3T/libHScpython-3.5.1-2jjfSLelR2GLOBJAe0FX3T.a(CPython.o)(.text+0x7e3): error: undefined reference to 'PySys_SetArgv'
/home/xxx/.stack/snapshots/x86_64-linux-tinfo6/684b9a848f341018285ac518c1050e1ae49a4d51abeaa9fa60618eaf63ef089d/8.8.4/lib/x86_64-linux-ghc-8.8.4/cpython-3.5.1-2jjfSLelR2GLOBJAe0FX3T/libHScpython-3.5.1-2jjfSLelR2GLOBJAe0FX3T.a(CPython.o):function cpythonzm3zi5zi1zm2jjfSLelR2GLOBJAe0FX3T_CPython_getPythonHome1_info: error: undefined reference to 'Py_GetPythonHome'
<omitting many other error messages>

Let me know if I've missed something obvious, as I have little to none experience troubleshotting GHC linker issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions