smfrpc / smf

Fastest RPC in the west
http://smfrpc.github.io/smf/
Other
722 stars 67 forks source link

smf build fails on linux mint 18 #214

Closed crackcomm closed 6 years ago

crackcomm commented 6 years ago

c++ (Ubuntu/Linaro 6.3.0-18ubuntu2~16.04) 6.3.0 20170519.

build log

I tried installing g++-7 c++ (Ubuntu 7.2.0-1ubuntu1~16.04) 7.2.0

build log

emaxerrno commented 6 years ago

Got it! thanks. looking into it.

crackcomm commented 6 years ago

@senior7515 I kept looking and I see /usr/include/c++/6 - probably it?

emaxerrno commented 6 years ago

could be, i've tested w/ gcc6.

can you cd build_debug && ninja -j1

crackcomm commented 6 years ago

I did sudo mv /usr/include/c++/6 /usr/include/c++/6-not-used and cd build_debug && ninja -j1, same error.

crackcomm commented 6 years ago

exact log: https://gist.github.com/crackcomm/6e80afb82de7e00f6035f3aa4095df57

emaxerrno commented 6 years ago

seastar is failing, https://travis-ci.org/scylladb/seastar/jobs/347447890

can you try this git hash: on seastar: 0ed15e9

crackcomm commented 6 years ago

@senior7515 this is weird, seastar compiled fine, earlier with g++ 6.3.0.

I will try at 0ed15e9.

dotnwat commented 6 years ago

that's weird. the seastar version is pegged in ci (https://github.com/senior7515/smf/blob/master/ci/base/Dockerfile#L13), i wonder why its failing on travis

crackcomm commented 6 years ago

here is the log this time: https://gist.github.com/crackcomm/3285f7c45071ec98f6ec9d7f90706353

emaxerrno commented 6 years ago

thanks @crackcomm ... pretty helpful. Trying to repro locally.

emaxerrno commented 6 years ago

@noahdesu - good point. will try to build locally at this revision and see if I can repro

emaxerrno commented 6 years ago

good news, is I can repro at that git hash of seastar!

emaxerrno commented 6 years ago

fix on the way. thanks!

crackcomm commented 6 years ago

@senior7515 thanks, in fact it fixed the error

still, the previous error remains: https://gist.github.com/crackcomm/7f83ed85c6f50897c5f384614c70be6e

emaxerrno commented 6 years ago

ok that's good. (re: bugfix/ci). Have you by chance tried the latest seastar hash now that that bug is gone, and or the one on the dockerfile.

once i can get a reproducible bug on my machine, I can fix it.

thanks!

crackcomm commented 6 years ago

seastar master log: https://gist.github.com/crackcomm/b0bd049ec294869eddaea35c202b813b

dotnwat commented 6 years ago

Perhaps we can reproduce in docker. Are you running Linux mint? Which version etc? On Wed, Feb 28, 2018 at 17:05 Łukasz Kurowski notifications@github.com wrote:

seastar master log: https://gist.github.com/crackcomm/b0bd049ec294869eddaea35c202b813b

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/senior7515/smf/issues/214#issuecomment-369439223, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOy8TTeuD0X_eMXwwi08Nf5EHn28ppxks5tZ0lkgaJpZM4SXirL .

crackcomm commented 6 years ago

Linux Mint 18.2 Sonya

emaxerrno commented 6 years ago

Will try to repro w/ docker. thanks @crackcomm !

crackcomm commented 6 years ago

let me know if I can be helpful somehow

emaxerrno commented 6 years ago

tried running on docker, and not getting very far tonight... :'( will keep hacking on it this week.

I did notice a few things. linux mint 18 is basically ubuntu xenial - which should actually just work :'( - i think i was running some weird docker image. Do you have a good ref for linuxmint:18 - doing a docker search for it didn't return trust worthy results.

do you mind manually setting these 2 variables (on $SMF_ROOT/CMakeLists.txt)

SET(CMAKE_C_COMPILER /path/to/c/compiler)
SET(CMAKE_CXX_COMPILER /path/to/cpp/compiler)

to a later gcc - say gcc6 to test it out.

make sure you also set the --compiler=gcc-6 on seastar too

emaxerrno commented 6 years ago

I tried building on this: https://hub.docker.com/r/linuxmintd/mint18-amd64/tags/

and i keep getting errors related to this:

2184a311eeda smf # sudo add-apt-repository ppa:ubuntu-toolchain-r/test
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 25, in <module>
    import gi
ImportError: No module named gi

I also tried the other one https://hub.docker.com/r/vcatechnology/linux-mint/tags/ tag 18.2 - same with this https://hub.docker.com/r/fabiohbarbosa/linux-mint/tags/

but no cigar

73884893c3d8 / # add-apt-repository ppa:ubuntu-toolchain-r/test
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 10, in <module>
    import aptsources.distro
ImportError: No module named aptsources.distro

maybe you can push a docker image and I can download it and repro it.

emaxerrno commented 6 years ago

@crackcomm let me know if you manage to push a docker image and I will fix it tonight.

crackcomm commented 6 years ago

@senior7515 I am going to test it out, with gcc-6

I already have some weird noise in here:

➜  seastar git:(master) ✗ python3 configure.py --compiler=g++-6
Notice: -fsanitize=vptr is broken, disabling; some debug mode tests are bypassed.
Notice: disabling -Wattributes due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947
Seastar requires g++ >= 4.9.  Install g++-4.9 or later (use --compiler option).

g++-7:

➜  seastar git:(master) ✗ python3 configure.py --compiler=g++-7
Notice: -fsanitize=vptr is broken, disabling; some debug mode tests are bypassed.
Notice: disabling -Wattributes due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947

I am having some trouble with CMake, I will re-pull and build.

What would you want me to include in a Docker image?

crackcomm commented 6 years ago

Is there some easy way to build a docker image from my entire OS?

crackcomm commented 6 years ago

I think this has to be some incompatibility with C++ tool-chain in Mint packages.

Here is my repos list, can't find a good, other image of mint than you found.

I am now rebuilding seastar with gcc-6 and later smf with gcc-6, previously there might've been some incompatibility as I had to update CMake to build smf and later install g++-7.

I have to admit the error from the C++ compiler does not make too much sense for me but correct me if I'm wrong, this error origins from seastar source code distributed.hh and httpd.hh and not in smf? It seems odd because seastar compiled fine and I even made a quick comparison between seastar httpd ad Go net/http.

I wish I could help more but I am not sure what I can do, thank you for your support.

crackcomm commented 6 years ago

I tried to build on Ubuntu 16.04 in Docker on VPS, here is the build log. reproducable easily with history which includes installing dependencies from seastar install-dependencies.sh and smf install-deps.sh.

dotnwat commented 6 years ago

i removed xenial from travis-ci at some point as either (1) stock gcc was too old or (2) needed some additional setup in cmake. that would explain the issue, as i thought xenial was still active in ci. we should add a xenial config to the travis config file

dotnwat commented 6 years ago

https://travis-ci.org/noahdesu/smf/jobs/348003612

crackcomm commented 6 years ago

@noahdesu both :)

I was able to build on docker image mentioned previously by doing

apt-get remove g++-5
apt-get install g++-7-multilib
apt autoremove
dotnwat commented 6 years ago

cool cool. so, this is really easy to hack into the travis-ci for on going testing. thanks for narrowing this down. in terms of fixes, i wonder if this is just a documentation fix: "if you are using xenial or mint, you need to upgrade gcc" ?

crackcomm commented 6 years ago

also remove old libstdc++

dotnwat commented 6 years ago

maybe can skip removing g++5 and libstdc++ by using update-alternatives, but haven't tested: https://github.com/ceph/ceph/blob/master/install-deps.sh#L63

crackcomm commented 6 years ago

it only updates binaries location not libstdc++ and only after removing it it worked out. if you could somehow do same with libraries then it could work out

crackcomm commented 6 years ago

problem is also apt-get install -qy g++-7 does not install these std libs but apt-get install g++-7-multilib

emaxerrno commented 6 years ago

thank you @crackcomm - great tracking down!!! let's definitely track this in the travis script!

w00t! excited to have you up and running!

emaxerrno commented 6 years ago

@crackcomm - are you thinking of submitting a PR for the multilib and ubunu:xenial ?

crackcomm commented 6 years ago

@senior7515 I am not sure, do you mean adding install in ci/base/Dockerfile and ubuntu:xenial in .travis.yml? or install in install-deps.sh?

emaxerrno commented 6 years ago

oh just thinking of getting .travis.yml working with ubuntu:xenial