Skip to content
Discussion options

You must be logged in to vote

That's the issue - the symlink. When cross mounts your project into Docker at /project, it copies the symlink itself but the target it points to doesn't exist inside the container. So the linker sees a broken symlink and can't find the .a file.

The fix: replace the symlink with the actual file. Either copy it directly:

cp -L lib/libaibusclient.a lib/libaibusclient.a

Or if you want to keep building the lib separately and having it auto-update, add a pre-build step to your workflow that dereferences the symlink before running cross:

# Dereference all symlinks in lib/
for f in lib/*.a; do
    if [ -L "$f" ]; then
        cp --remove-destination "$(readlink -f "$f")" "$f"
    fi
done
cross bu…

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@AidFTech
Comment options

@Nickalus12
Comment options

@AidFTech
Comment options

@Nickalus12
Comment options

Answer selected by AidFTech
@AidFTech
Comment options

@Nickalus12
Comment options

@AidFTech
Comment options

@AidFTech
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants