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

jpm build fails on fresh clone (Windows 10) #18

Open
monkey-w1n5t0n opened this issue Mar 9, 2021 · 2 comments
Open

jpm build fails on fresh clone (Windows 10) #18

monkey-w1n5t0n opened this issue Mar 9, 2021 · 2 comments

Comments

@monkey-w1n5t0n
Copy link

Building a fresh clone fails with multiple unresolved external symbols and a warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'.

Output:
PS C:\Users\w1n5t0n\code\janet> git clone --recursive https://github.com/janet-lang/jaylib.git
Cloning into 'jaylib'...
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (21/21), done.

Receiving objects: 100% (198/198), 1.64 MiB | 4.30 MiB/s, done.
Resolving deltas: 100% (108/108), done.
Submodule 'raylib' (https://github.com/raysan5/raylib.git) registered for path 'raylib'
Cloning into 'C:/Users/w1n5t0n/code/janet/jaylib/raylib'...
remote: Enumerating objects: 28232, done.
remote: Total 28232 (delta 0), reused 0 (delta 0), pack-reused 28232
Receiving objects: 100% (28232/28232), 355.95 MiB | 10.19 MiB/s, done.
Resolving deltas: 100% (20070/20070), done.
Submodule path 'raylib': checked out '7ef114d1da2c34a70bba5442497103441647d8f3'


PS C:\Users\w1n5t0n\code\janet> cd .\jaylib\


PS C:\Users\w1n5t0n\code\janet\jaylib> jpm build
compiling src/main.c to build\src___main.obj...
main.c
compiling raylib/src/core.c to build\raylib___src___core.obj...
core.c
C:\Users\w1n5t0n\code\janet\jaylib\raylib\src\rlgl.h(1646): warning C4090: 'function': different 'const' qualifiers
compiling raylib/src/models.c to build\raylib___src___models.obj...
models.c
compiling raylib/src/raudio.c to build\raylib___src___raudio.obj...
raudio.c
compiling raylib/src/rglfw.c to build\raylib___src___rglfw.obj...
rglfw.c
compiling raylib/src/shapes.c to build\raylib___src___shapes.obj...
shapes.c
compiling raylib/src/text.c to build\raylib___src___text.obj...
text.c
compiling raylib/src/textures.c to build\raylib___src___textures.obj...
textures.c
compiling raylib/src/utils.c to build\raylib___src___utils.obj...
utils.c
linking build\jaylib.dll...
   Creating library build\jaylib.lib and object build\jaylib.exp
src___main.obj : error LNK2019: unresolved external symbol _janet_unwrap_number referenced in function _idx_getfloat
src___main.obj : error LNK2019: unresolved external symbol _janet_wrap_number referenced in function _cfun_GetScreenWidth
src___main.obj : error LNK2019: unresolved external symbol _janet_nanbox32_from_tagi referenced in function _cfun_InitWindow
src___main.obj : error LNK2019: unresolved external symbol _janet_nanbox32_from_tagp referenced in function _cfun_GetWindowHandle
src___main.obj : error LNK2019: unresolved external symbol _janet_checkint referenced in function _jaylib_castdef
src___main.obj : error LNK2019: unresolved external symbol _janet_array referenced in function _cfun_SetConfigFlags
src___main.obj : error LNK2019: unresolved external symbol _janet_array_push referenced in function _cfun_SetConfigFlags
src___main.obj : error LNK2019: unresolved external symbol _janet_buffer_push_u8 referenced in function _cfun_DrawText
src___main.obj : error LNK2019: unresolved external symbol _janet_tuple_begin referenced in function _cfun_GetMousePosition
src___main.obj : error LNK2019: unresolved external symbol _janet_tuple_end referenced in function _cfun_GetMousePosition
src___main.obj : error LNK2019: unresolved external symbol _janet_tuple_n referenced in function _cfun_ImageDimensions
src___main.obj : error LNK2019: unresolved external symbol _janet_string_begin referenced in function _jaylib_tracelog_callback
src___main.obj : error LNK2019: unresolved external symbol _janet_string_end referenced in function _jaylib_tracelog_callback
src___main.obj : error LNK2019: unresolved external symbol _janet_cstring referenced in function _cfun_GetMonitorName
src___main.obj : error LNK2019: unresolved external symbol _janet_csymbol referenced in function _cfun_SetConfigFlags
src___main.obj : error LNK2019: unresolved external symbol _janet_indexed_view referenced in function _cfun_LoadImageEx
src___main.obj : error LNK2019: unresolved external symbol _janet_abstract referenced in function _cfun_Camera2D
src___main.obj : error LNK2019: unresolved external symbol _janet_gcroot referenced in function _cfun_SetTraceLogCallback
src___main.obj : error LNK2019: unresolved external symbol _janet_gcunroot referenced in function _cfun_SetTraceLogCallback
src___main.obj : error LNK2019: unresolved external symbol _janet_cstrcmp referenced in function _cfun_SetConfigFlags
src___main.obj : error LNK2019: unresolved external symbol _janet_pcall referenced in function _jaylib_tracelog_callback
src___main.obj : error LNK2019: unresolved external symbol _janet_stacktrace referenced in function _jaylib_tracelog_callback
src___main.obj : error LNK2019: unresolved external symbol _janet_smalloc referenced in function _cfun_LoadFontEx
src___main.obj : error LNK2019: unresolved external symbol _janet_sfree referenced in function _cfun_DrawLineStrip
src___main.obj : error LNK2019: unresolved external symbol _janet_cfuns referenced in function __janet_init
src___main.obj : error LNK2019: unresolved external symbol _janet_panicf referenced in function _cfun_SetConfigFlags
src___main.obj : error LNK2019: unresolved external symbol _janet_arity referenced in function _cfun_SetConfigFlags
src___main.obj : error LNK2019: unresolved external symbol _janet_fixarity referenced in function _cfun_InitWindow
src___main.obj : error LNK2019: unresolved external symbol _janet_getnumber referenced in function _cfun_SetMouseScale
src___main.obj : error LNK2019: unresolved external symbol _janet_getcstring referenced in function _cfun_InitWindow
src___main.obj : error LNK2019: unresolved external symbol _janet_getkeyword referenced in function _cfun_SetConfigFlags
src___main.obj : error LNK2019: unresolved external symbol _janet_getbuffer referenced in function _cfun_UpdateAudioStream
src___main.obj : error LNK2019: unresolved external symbol _janet_getfunction referenced in function _cfun_SetTraceLogCallback
src___main.obj : error LNK2019: unresolved external symbol _janet_getinteger referenced in function _cfun_InitWindow
src___main.obj : error LNK2019: unresolved external symbol _janet_getinteger64 referenced in function _cfun_LoadImageEx
src___main.obj : error LNK2019: unresolved external symbol _janet_getindexed referenced in function _cfun_LoadFontEx
src___main.obj : error LNK2019: unresolved external symbol _janet_getabstract referenced in function _cfun_BeginMode2D


C:\Users\w1n5t0n\AppData\Local\Apps\Janet\C\\\janet.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
build\jaylib.dll : fatal error LNK1120: 37 unresolved externals
error: command failed with non-zero exit code 1120
  in os/execute
  in shell [C:\Users\w1n5t0n\AppData\Local\Apps\Janet\bin\\jpm.janet] (tailcall) on line 172, column 3
  in do-rule [C:\Users\w1n5t0n\AppData\Local\Apps\Janet\bin\\jpm.janet] on line 291, column 26
  in do-rule [C:\Users\w1n5t0n\AppData\Local\Apps\Janet\bin\\jpm.janet] (tailcall) on line 287, column 44
  in _thunk [C:\Users\w1n5t0n\AppData\Local\Apps\Janet\bin\\jpm.janet] on line -1, column -1
  in cli-main [boot.janet] on line 3371, column 39


PS C:\Users\w1n5t0n\code\janet\jaylib> janet -v
1.15.3-6392b37

Janet version 1.15.3-6392b37

@profan
Copy link
Contributor

profan commented Mar 11, 2021

@lm-w1n5t0n build from inside this:
image

also make sure to clean up any built object files in between as well or it may just break again just the same, this was how i sorted it out at least 👀

@ahribellah
Copy link

ahribellah commented Nov 28, 2022

For what it's worth, I just did a build with VS2022 and it seems to have worked. The readme seemed to indicate that it wouldn't.

EDIT: To be clear, I ran the exact command mentioned in the readme:

jpm install https://github.com/janet-lang/jaylib.git

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

3 participants