genotrance / nimarchive

libarchive wrapper for Nim
MIT License
17 stars 3 forks source link

Cant crosscompile #6

Closed SolitudeSF closed 4 years ago

SolitudeSF commented 4 years ago

Crosscompiling fails with

  ... checking whether we are cross compiling... configure: error: in `/tmp/.cache/nim/nimterop/nimarchive/liblzma':
        ... configure: error: cannot run C compiled programs.
        ... If you meant to cross compile, use `--host'.
genotrance commented 4 years ago

Nimterop doesn't work with cross-compiling scenarios since Nim itself doesn't support it.

https://github.com/nimterop/nimterop/issues/126

Basically, once you set the target OS to something else, every compile-time call will run as if it is on the target. This breaks many things that nimterop does.

Can you share more details on what you are trying?

SolitudeSF commented 4 years ago

im trying to update choosenim for void linux, and it requires package to be built for arm. i guess im gonna mark it as non crosscompilable.

genotrance commented 4 years ago

Building for arm using GCC on Linux should still work since the host and target are still posix systems.

How about passing some extra flags to configure? You'd need to edit the package but once you get it working, we can look into making it something that can be detected.

SolitudeSF commented 4 years ago

you gonna have to guide me, since im no expert

genotrance commented 4 years ago

Catch me on #nim.