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

bundle failing #5

Open
PhilMo6 opened this issue Nov 12, 2020 · 7 comments
Open

bundle failing #5

PhilMo6 opened this issue Nov 12, 2020 · 7 comments

Comments

@PhilMo6
Copy link

PhilMo6 commented Nov 12, 2020

Im trying to bundle my project into an exe and no matter how I use the bundle script it seems to fail.
I am on windows 10 and it give me a different error depending on what I do.

./mgit bundle -a --all -m --all -M main -o fat.exe

gets me

luajit: ui_list.lua:16: '' expected near 'if'
{standard input}: Assembler messages:
{standard input}:6: Error: file not found: .bundle-tmp/mingw64/ui_list.lua.o.luac
patch: **** Can't create file ../../../bundle/luajit.c : Invalid cross-device link
g++.exe: error: .bundle-tmp/mingw64/ui_list.lua.o: No such file or directory

./mgit bundle -a 'socket_core mime_core' -m 'socket mime ltn12 socket/*.lua' -o luajit.exe

gets me

patch: **** Can't create file ../../../bundle/luajit.c : Invalid cross-device link
bin/mingw64/luajit.a: member bin/mingw64/luajit.a(lj_vm.o) in archive is not an object
collect2.exe: error: ld returned 1 exit status

which is the same error I get when I try and bundle my project.

@Sledmine
Copy link

I made a script that simplifies the bundle process if you want to give it a look, I don't know If I'm too late to give a hand with this.

https://github.com/Sledmine/Mercury/blob/1.0.2/compile.lua

@PhilMo6
Copy link
Author

PhilMo6 commented Dec 25, 2020

well sweet sauce all over the taco of life, that looks promising! thanks!

@capr
Copy link
Member

capr commented Nov 8, 2021

Alright, I had a little time today and fixed the patch issue. For some reason patch on msys or cygwin can't deal with .. in its -o option anymre (worked in older versions). Whatever, works now. Thanks for the bug report. Feel free to reopen this if it isn't fixed for you.

@capr capr closed this as completed Nov 8, 2021
@PhilMo6
Copy link
Author

PhilMo6 commented Nov 13, 2021

Well I gave it another go with the new updated buddle package and am getting a different error.

$ .mgit/bundle.sh -a sha2 -m 'sha2 media/bmp/bg.bmp' -M main -o lean.exe
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: bin/mingw64/luajit.a: member bin/mingw64/luajit.a(lj_vm.o) in archive is not an object
collect2.exe: error: ld returned 1 exit status

Not sure if it has anything to do with me running the script directly or that im using gitbash or anything else perhaps. I get the same error on both my desktop and laptop.

@PhilMo6
Copy link
Author

PhilMo6 commented Nov 14, 2021

so lines 315 and 316 of the bundle.sh file contain a -o option with ..
im not sure how i would go about fixing that

@capr
Copy link
Member

capr commented Nov 14, 2021

Now I can't reproduce. Maybe remove .bundle-tmp and try again?

@capr capr reopened this Nov 14, 2021
@jjonethal
Copy link

jjonethal commented May 4, 2022

to late as usual, seems like msys2 / mingw compiler/lib confusion. make sure not to mix msys / mingw libs during compilation. check you PATH variable for order of mingw/msys paths. as msys2 and mingwXX are 2 complete different things regarding object / library / runtime / toolchain point. Thats easy to mixup problems when using git bash / msys2 shell

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

No branches or pull requests

4 participants