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

fails to compile on Pentoo x86 #409

Closed
blshkv opened this issue Dec 20, 2018 · 9 comments
Closed

fails to compile on Pentoo x86 #409

blshkv opened this issue Dec 20, 2018 · 9 comments

Comments

@blshkv
Copy link

blshkv commented Dec 20, 2018

It was possible to compile 2.10 on x86, however 2.11 fails with the following error:

cd /var/tmp/portage/net-analyzer/bettercap-2.11/work/bettercap-2.11/src/github.com/bettercap/bettercap/vendor/github.com/tarm/serial
/usr/lib/go/pkg/tool/linux_386/compile -o $WORK/b171/_pkg_.a -trimpath $WORK/b171 -p github.com/bettercap/bettercap/vendor/github.com/tarm/serial -complete -buildid 04FNqbePtesOiJC0j4tO/04FNqbePtesOiJC0j4tO -goversion go1.10.3 -D "" -importcfg $WORK/b171/importcfg -pack -c=2 ./serial.go ./serial_linux.go
/usr/lib/go/pkg/tool/linux_386/buildid -w $WORK/b171/_pkg_.a # internal
/usr/lib/go/pkg/tool/linux_386/buildid -w $WORK/b170/_pkg_.a # internal
 * ERROR: net-analyzer/bettercap-2.11::pentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_compile
 *   environment, line 437:  Called golang-build_src_compile
 *   environment, line 369:  Called die
 * The specific snippet of code:
 *       "$@" || die

We are using Go.pkg.lock as the source for the required dependences and a specific commit

The full log is uploaded in the link below:
https://paste.pound-python.org/raw/oEp8L0dCjgjNLnRwdDRX/

The relevant difference in-between commits may be the following:

2.10
"github.com/tarm/serial eaafced92e9619f03c72527efeab21e326f3bc36"
2.11
"github.com/tarm/serial 98f6abe2eb07edd42f6dfa2a934aea469acc29b7

@ZeroChaos- can provide more details if required

@blshkv
Copy link
Author

blshkv commented Dec 20, 2018

The full diff is of deps is below:

diff bettercap-2.10.ebuild bettercap-2.11.ebuild 
6a7
>       "github.com/adrianmo/go-nmea a32116e4989e2b0e17c057ee378b4d5246add74e"
10,12c11,14
<       "github.com/dustin/go-humanize 02af3965c54e8cacf948b97fef38925c4120652c"
<       "github.com/elazarl/goproxy a96fa3a318260eab29abaf32f7128c9eb07fb073"
<       "github.com/gobwas/glob f00a7392b43971b2fdb562418faab1f18da2067a"
---
>       "github.com/dustin/go-humanize 9f541cc9db5d55bce703bd99987c9d5cb8eea45e"
>       "github.com/elazarl/goproxy f58a169a71a51037728990b2d3597a14f56b525b"
>       "github.com/evilsocket/islazy 3d8400c74f9dbc626d913e0575cda05d914bea57"
>       "github.com/gobwas/glob e7a84e9525fe90abcda167b604e483cc959ad4aa"
13a16,18
>       "github.com/google/go-querystring 44c6ddd0a2342c386950e880b658017258da92fc"
> 
>       "github.com/gorilla/context 08b5f424b9271eedf6f9f0ce86cb9396ed337a42"
15c20
<       "github.com/jpillora/go-tld a31ae10e978ab5f352c5dad2cfbd60546dcea75f"
---
>       "github.com/jpillora/go-tld 4bfc8d9a90b591e101a56265afc2239359fb0810"
16a22,23
>       "github.com/mattn/go-colorable 167de6bfdfba052fa6b2d3664c8f5272e23c9072"
> 
18,20c25,32
<       "github.com/robertkrimen/otto 03d472dc43abece8691e609a23d295ab732abba6"
<       "github.com/tarm/serial eaafced92e9619f03c72527efeab21e326f3bc36"
<       "github.com/adrianmo/go-nmea 22095aa1b48050243d3eb9a001ca80eb91a0c6fa"
---
>       "github.com/mdlayher/raw 67a536258490ec29bca6d465b51dea32c0db3623"
>       "github.com/mgutz/ansi 9520e82c474b0a04dd04f8a40959027271bab992"
>       "github.com/mgutz/logxi aebf8a7d67ab4625e0fd4a665766fef9a709161b"
>       "github.com/pkg/errors 645ef00459ed84a119197bfb8d8205042c6df63d"
>       "github.com/robertkrimen/otto 15f95af6e78dcd2030d8195a138bd88d4f403546"
>       "github.com/tarm/serial 98f6abe2eb07edd42f6dfa2a934aea469acc29b7"
>       "gopkg.in/sourcemap.v1 6e83acea0053641eff084973fee085f0c193c61a github.com/go-sourcemap/sourcemap"
> 
42a55
>       dev-go/go-net

Btw, it is difficult to catch up with that dynamic list. Hope you can stabilize it at some point or not to change it dramatically between minor versions at least.

@evilsocket
Copy link
Member

I'm not sure I can see what the specific error is ...

@blshkv
Copy link
Author

blshkv commented Jan 7, 2019

yeah, we were puzzled as well. I guess the best would be to try it yourself on a x86 machine ..

@evilsocket
Copy link
Member

if you guys didn't get that error message, i don't think i can do better than that :D

@blshkv
Copy link
Author

blshkv commented Jan 11, 2019

I managed to reproduce on x86 another machine. I can provide the entire go-build folder with .a and importcfg files, and go-cache folder but I'm not sure if it can be useful.
The build log is here:
https://gist.github.com/blshkv/fbb1a5e5c9f390c44b94f1a3363daafd

Have you tried to compile on x86 yourself?

@evilsocket
Copy link
Member

no not really, will try to setup a vm when i have time

@evilsocket evilsocket changed the title fails to compile on x86 fails to compile on Pentoo x86 Jan 14, 2019
@evilsocket
Copy link
Member

worked out of the box for me

schermata da 2019-01-18 20-05-35

@blshkv
Copy link
Author

blshkv commented Jan 20, 2019

I have spent some time and figured it out. The v2.11.1 release is effected only.
After trials and errors I found that the latest version of github.com/mdlayher/raw must be used (2.11.x is locked to the older version). They have fixed it here:
mdlayher/raw@15057db

Please release a new version at some point.

Thank you

@evilsocket
Copy link
Member

fixed in 34db9e5

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

2 participants