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

golang-macros.rb doesn't work as expected #6

Closed
matwey opened this issue Jan 4, 2016 · 4 comments
Closed

golang-macros.rb doesn't work as expected #6

matwey opened this issue Jan 4, 2016 · 4 comments

Comments

@matwey
Copy link

matwey commented Jan 4, 2016

Look here https://build.opensuse.org/package/live_build_log/home:matwey:influxdb_0.9.6.1/golang-github-golang-protobuf/openSUSE_Leap_42.1/i586

Segmentation fault occurred in go compiler

[   59s] /usr/lib/go/pkg/tool/linux_386/compile -o $WORK/github.com/golang/protobuf/proto.a -trimpath $WORK -p github.com/golang/protobuf/proto -complete -buildid 02dcdff0c737159eb5b2fa1723f1edabb219aee1 -D _/home/abuild/rpmbuild/BUILD/go/src/github.com/golang/protobuf/proto -I $WORK -pack ./clone.go ./decode.go ./encode.go ./equal.go ./extensions.go ./lib.go ./message_set.go ./pointer_unsafe.go ./properties.go ./text.go ./text_parser.go
[   59s] go build github.com/golang/protobuf/proto: /usr/lib/go/pkg/tool/linux_386/compile: signal: segmentation fault
[   59s] Build Finished!
[   59s] + exit 0

instead of failing the build right here it proceeds and fails with cryptic error later.

[   61s] RPM build errors:
[   61s]     File not found: /home/abuild/rpmbuild/BUILDROOT/golang-github-golang-protobuf-0.0.0+git20151207.68415e7-8.4.i386/usr/bin/protoc-gen-go
[   61s]     File not found by glob: /home/abuild/rpmbuild/BUILDROOT/golang-github-golang-protobuf-0.0.0+git20151207.68415e7-8.4.i386/usr/lib/go/contrib/pkg/linux_386/*

Could you please return old behavior?

@marguerite
Copy link
Owner

I can catch stderr and make it fail at the right place, but the segmentation fault is apparently not because of my code.

@matwey
Copy link
Author

matwey commented Jan 5, 2016

Of course SIGFAULT is not due your code. You should handle process status when you call it. This is what bash does for you.

Every system should be wrapped somehow like that:

if ! system("abc")
    exit($?)
end

@marguerite
Copy link
Owner

I wonder if I should skip installation and -source packaging as well.

I don't know if the build process (which is bash) will stop when ruby script returns an unclean exit.

@marguerite
Copy link
Owner

fixed in master

marguerite pushed a commit that referenced this issue Feb 18, 2018
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

2 participants