Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

cinterop tool path problem when creating klib #704

Closed
rnentjes opened this issue Jun 24, 2017 · 5 comments
Closed

cinterop tool path problem when creating klib #704

rnentjes opened this issue Jun 24, 2017 · 5 comments

Comments

@rnentjes
Copy link

When I try to create a klib from a sfml.def file I get the error below. It looks like clang is working from a different path or something because the file mentioned does exists.

Error:

rnentjes@rnentjes-VPCF13S0E:~/Development/konan/konan-game$ ../kotlin-native/dist/bin/cinterop -def def/sfml.def -o sfml
/home/rnentjes/Development/konan/kotlin-native/dist/dependencies/clang-llvm-3.9.0-linux-x86-64/bin/clang -I/usr/include -isystem /home/rnentjes/Development/konan/kotlin-native/dist/dependencies/clang-llvm-3.9.0-linux-x86-64/lib/clang/3.9.0/include --gcc-toolchain=/home/rnentjes/Development/konan/kotlin-native/dist/dependencies/target-gcc-toolchain-3-linux-x86-64 -L/home/rnentjes/Development/konan/kotlin-native/dist/dependencies/clang-llvm-3.9.0-linux-x86-64/lib -B/home/rnentjes/Development/konan/kotlin-native/dist/dependencies/target-gcc-toolchain-3-linux-x86-64/x86_64-unknown-linux-gnu/sysroot/../bin --sysroot=/home/rnentjes/Development/konan/kotlin-native/dist/dependencies/target-gcc-toolchain-3-linux-x86-64/x86_64-unknown-linux-gnu/sysroot -emit-llvm -c sfml-build/natives/cstubs.c -o sfml-build/natives/cstubs.bc
clang-3.9: error: no such file or directory: 'sfml-build/natives/cstubs.c'
clang-3.9: error: no input files
Exception in thread "main" java.lang.Error: Process finished with non-zero exit code: 1
        at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.runExpectingSuccess(main.kt:106)
        at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.runCmd(main.kt:152)
        at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processLib(main.kt:382)
        at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.main(main.kt:37)

sfml.def:

# SFML/Audio.h SFML/Config.h SFML/Graphics.h SFML/Network.h SFML/OpenGL.h SFML/System.h SFML/Window.h
headers = SFML/Audio.h SFML/Config.h SFML/Graphics.h SFML/Network.h SFML/System.h SFML/Window.h
compilerOpts =
excludedFunctions =
compilerOpts.linux = -I/usr/include

The sfml-build contains the following files after the error:

sfml-build/kotlin/sfml/sfml.kt
sfml-build/natives/cstubs.c
@olonho
Copy link
Contributor

olonho commented Jun 25, 2017

Did you try to use interop tool from redistributable, or self-built it? Please try http://download.jetbrains.com/kotlin/native/kotlin-native-linux-0.3.tar.gz

@olonho
Copy link
Contributor

olonho commented Jun 25, 2017

I am unable to reproduce this problem with x86-64 Ubuntu 16.04, C SFML bindings 2.1-2 installed by apt and current trunk. For reference, attaching generated klib.

@olonho
Copy link
Contributor

olonho commented Jun 25, 2017

sfml.klib.zip

@olonho
Copy link
Contributor

olonho commented Jun 25, 2017

Please provide more information about your system and configuration, otherwise we cannot help resolve this bug.

@rnentjes
Copy link
Author

Ok, so it turns out that my local git repo was not updated correctly to the latest version. Sorry about that, latest version works fine.

Thanks for the help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants