-
Notifications
You must be signed in to change notification settings - Fork 83
Unable to bundle - Help Needed !! #28
Comments
Mmm this is weird, could you execute the bundling with the |
Thanks for the reply. Here is the logs. DEBU[0000] Resetting : exit status 2 |
A few more questions:
|
(for future references, it may be linked to this issue) |
|
@HIMANSHURANJAN2015 I've added a fix in a specific branch in the bundler project. Could you:
And tell me whether it's working? |
Thanks..that worked for the go-astilectron-demo app. I tried building it for darwin-amd64 ,linux-amd64 and windows-386. I have the executables for all the 3 environments :) . But for my Project, which i have developed following go-astilectron-demo app, is still not building.
This is my bundler.json
Any clue of how to debug, this!! Thanks again. |
this is weird because this is the same error as before... therefore the fix I've pushed for the bundler is not working and I can't explain why it worked bundling the demo... |
I have even tried clearing my cache for bundler. But i am unable to understand as to why is it building for i386, when i have mentioned amd64 and linux in my bundler.json. |
you could try to remove all content in your |
I tried deleting entire files of /tmp folder.
Still it dint work. Something is weird with my project-config, which i am unable to figure out. |
could you try rolling back the bundler to the previous version and try again?
|
I'm having the same issue |
I believe I may be having the same issue.
removing the Linux entry results in a working Windows executable ... but now removing the entire "environments" key (original bundler.json) so that it attempts to compile as the native linux-amd64 still results in the above error... but as I said it compiled fine at first.
|
I'm experiencing the same issue but fixed it adding the following line to
|
@eelcocramer I don't think this is the same issue since as indicated in the doc, you're supposed to delete the |
You are right. I'm sorry about the confusion. |
also experiencing the same
tried pulling the latest github.com/asticode/go-astilectron-bundler master, still getting the same. tried deleting 1st time i tried it everything worked great. dunno what suddenly changed, will be glad to provide further info. |
BREAKING NEWS: kkthx great show nice job 🥇 |
@mastern2k3 since adding ldflags fixes this problem, bare in mind that you can inject your own ldflags in the In this case, adding Can you confirm? |
I tried the ldflags thing and it still fails. |
|
I'll try, I'm kind of new to go. I did try and do the test-link thing and got this: bundler.go:20:2: cannot find package "github.com/asticode/go-astitools/zip" in any of: that package doesn't exist it seems. |
DEBU[0000] Creating /home/steve/go/src/github.com/asticode/go-astilectron-demo/output : exit status 2 |
bundler.json { "ldflags": { "environments": [{ |
@sgehrman your bundler is not up to date. You need to run Can you retry after those 2 steps and paste the logs here ? |
looks the same: DEBU[0000] Creating /home/steve/go/src/github.com/asticode/go-astilectron-demo/output : exit status 2 |
I was able to build this, but then tried to add more environments and saw failures, now can't get it building for linux. |
Mmm indeed there was a bug that I've fixed. Could you retry updating the bundler, installing it and running it? |
Works for building linux now. And it works for building Darwin, but I've noticed that building for Darwin fails if it follows building for windows. So this fails for darwin: "environments": [{ DEBU[0020] Bundling for environment darwin/amd64 but this will succeed: "environments": [{ Thanks. |
I also tried removing the: "ldflags": { But got this: DEBU[0000] Creating /home/steve/go/src/github.com/asticode/go-astilectron-demo/output goroutine 1 [running]: Is that ldflags still needed? Thanks. |
Mmm the last panic is my fault, could you retry with the master branch? |
I did this: steve@tr4: and tried building again and got: DEBU[0000] Creating /home/steve/go/src/github.com/asticode/go-astilectron-demo/output "environments": [{ |
If I use just this: "environments": [{ It builds fine. |
Hey, I noticed that this happens for me as well. // bundler.json // error stack trace |
@ru-lai Are you using CGO in your project by any chance? |
I've got trouble bundling it with just windows. //bundler.json |
Did you run |
I just followed your instructions to the letter with go 1.12.6 and got this same error with the following output: fleeb@flip:~/go/src/github.com/asticode/go-astilectron-demo$ astilectron-bundler -v
DEBU[0000] Creating /home/fleeb/go/src/github.com/asticode/go-astilectron-demo/output app_name= source="bundler.go:316"
DEBU[0000] Bundling for environment linux/amd64 app_name= source="bundler.go:324"
DEBU[0000] Binding data app_name= source="bundler.go:336"
DEBU[0000] Removing /tmp/astibundler/bind app_name= source="bundler.go:415"
DEBU[0000] Creating /tmp/astibundler/bind app_name= source="bundler.go:422"
DEBU[0000] Creating /tmp/astibundler/bind/vendor_astilectron_bundler app_name= source="bundler.go:467"
DEBU[0000] Creating /tmp/astibundler/cache app_name= source="bundler.go:474"
DEBU[0000] /tmp/astibundler/cache/astilectron-0.32.0.zip already exists, skipping download of https://github.com/asticode/astilectron/archive/v0.32.0.zip app_name= source="bundler.go:503"
DEBU[0000] Copying /tmp/astibundler/cache/astilectron-0.32.0.zip to /tmp/astibundler/bind/vendor_astilectron_bundler/astilectron.zip app_name= source="bundler.go:512"
DEBU[0000] /tmp/astibundler/cache/electron-linux-amd64-4.0.1.zip already exists, skipping download of https://github.com/electron/electron/releases/download/v4.0.1/electron-v4.0.1-linux-x64.zip app_name= source="bundler.go:503"
DEBU[0000] Copying /tmp/astibundler/cache/electron-linux-amd64-4.0.1.zip to /tmp/astibundler/bind/vendor_astilectron_bundler/electron.zip app_name= source="bundler.go:512"
DEBU[0000] Creating /tmp/astibundler/bind/resources app_name= source="bundler.go:552"
DEBU[0000] Copying /home/fleeb/go/src/github.com/asticode/go-astilectron-demo/resources to /tmp/astibundler/bind/resources app_name= source="bundler.go:560"
DEBU[0000] Generating /home/fleeb/go/src/github.com/asticode/go-astilectron-demo/bind_linux_amd64.go app_name= source="bundler.go:459"
DEBU[0002] Removing /home/fleeb/go/src/github.com/asticode/go-astilectron-demo/output/linux-amd64 app_name= source="bundler.go:415"
DEBU[0002] Creating /home/fleeb/go/src/github.com/asticode/go-astilectron-demo/output/linux-amd64 app_name= source="bundler.go:422"
DEBU[0002] Building for os linux and arch amd64 app_name= source="bundler.go:375"
DEBU[0002] Executing go build -ldflags -X "main.AppName=Astilectron demo" -X "main.BuiltAt=2019-07-07 17:11:18.381824419 -0700 PDT m=+2.931859936" -o /home/fleeb/go/src/github.com/asticode/go-astilectron-demo/output/linux-amd64/binary github.com/asticode/go-astilectron-demo app_name= source="bundler.go:393"
FATA[0009] bundling failed: bundling for environment linux/amd64 failed: building failed: # github.com/asticode/go-astilectron-demo
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: i386 architecture of input file `/tmp/go-link-275377070/000000.o' is incompatible with i386:x86-64 output
collect2: error: ld returned 1 exit status
: exit status 2 app_name= source="main.go:121" Ubuntu 18.04.2 |
Ok I got everything to work by doing {
"app_name": "Astilectron demo",
"icon_path_darwin": "resources/icon.icns",
"icon_path_linux": "resources/icon.png",
"icon_path_windows": "resources/icon.ico",
"ldflags":{"linkmode":["internal"]},
"environments": [
{"arch": "amd64", "os": "linux"},
{"arch": "amd64", "os": "windows"}
]
} Adding the |
That's a good idea, just updated the bundler README |
I had an error because I linked sqlite3 (github.com/mattn/go-sqlite3) and the solution was to set linkmode as external (mattn/go-sqlite3#414 (comment))
|
When trying to build, i am getting this error.
1. I have not updated bundler.json to build for any specific architecture
2. go version go1.10 linux/amd64
3. I was able to build it for linux before, but then i tried to build it for windows architecture {"arch": "386", "os": "windows"} . It threw error and on subsequent attempt it didnt even build for linux. I guess somewhere i messed up my environments . Any help ??
The text was updated successfully, but these errors were encountered: