-
Notifications
You must be signed in to change notification settings - Fork 225
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
Possible problem with LTO on Anaconda 5.0 #6619
Comments
I have just come across this error message when compiling vim80 against anaconda
I did a I tried to pass
but did not work. |
@pschella, @3e4, please use our compilers. They are better than these other ones you are trying to use (and will obviously work much better with our packages all of which have been compiled with them, at least all of them that need compilation):
Closing this as the problem is with your system compilers (or devtoolset) being too old and we provide our own so we do not have to (and technically cannot) fix this kind of incompatiblity. |
Thank you for clarifying the origin of the error. This might be helpful to several people. Could you please give me a hint how to use it? After installing, I found the
There is a file |
You are not meant to source this file.
To put it in an isolated env with python3.6, you should do:
|
Really if you want to build vim using tools and libraries from the |
Well, I don't really want to, but as I have the python from anaconda in my path as default interpreter I had serious trouble to get YouCompleteMe working. Finally I figured out that by building my own vim against the anaconda python it works. Now it stopped working again because I can't get vim to build. I just tried with the environment, but I get into a lot of trouble. For one, it does not find my libncurses in /usr/lib/x86_64-linux-gnu
so I have to modify LDFLAGS:
It passes, but building fails because of lua (removed the lua from config), and then some XML errors (and using system
Maybe it picks up the system libpython because I modified LDFLAGS? |
I am not suggesting that you use this environment as your daily-driver, but per-workflow isolation is very important. If you don't want to ever type into a shell without
You should install the
You should try to avoid this. We provide enough software to build a huge amount of software and where we miss something |
Thank you for your time and help. I get
If I put
I will look into |
You need to look at |
It happens during configure, so below some lines from
Then it looks for other terminals (curses...). Error repeats. |
I do not see |
Try with:
|
Sorry, that was for the vanilla With your modified
When removing Any way to get lua (although I don't use it currently)? |
I think there's a bad communication problem here. I cannot advise or help out with what happens when you try to mix our software with your local software. It's completely outside of my control. Use |
OK. I will fix lua by myself. But may I still ask: The fact that ncurses is installed in conda but not found by configure. Is this a bug in For now I'm happy again. Thank you very much for your support! And I will look into |
It's hard to say, probably it's a bug in the Also installing our |
I installed the additional packages, and But then I get an error during
As you pointed out, your recommended way is |
This is not our compiler, our compilers have names like Given that you are using your system compiler (which will probably not end well) and it's failing to find an X11 header, this means you need to install the package containing that X11 header. To figure out the package: On Debian-based distros (like Ubuntu): This changes if you are using our compilers though, they do not look at your system includes ( Can you not just install vim from your distro though instead? Do you really want to go though all this pain? |
The reason I'm building vim by myself is that I was not able to get YCM working with conda's Just found out that many other functions of vim are not properly compiled when using the conda P.S.: I think Anaconda python is a very good tool and I had no trouble to introduce several colleagues to jupyter and install all required packages within an hour! |
I think I got it working now with the ubuntu vim. ( There were some old files hidden in my file system that I had to manually remove. Now I get package suggestions from the anaconda python. Probabaly there has been some progress in YCM since the time I was setting it up. |
Following this comment #6619 (comment) I was able to get terminal vim built against conda. However, I'm interested in getting vim running with a gui. I attempted to get the required gtk libs in conda, but I'm hitting an error. When vim checks for gtk>=2, it fails with The procedure I'm using to install dependencies and configure is: conda install gxx_linux-64
conda install ncurses
conda install -c mw gtk2
conda install pkg-config autoconf automake cmake libtool
#conda install -c pkgw/label/superseded gtk3
conda install -c pkgw-forge gtk3
conda install -c anaconda glib
#apt-cache showsrc vim-gtk | grep ^Build-Depends
conda install -c anaconda gtk2-devel-cos6-x86_64
conda install -c anaconda libxt-devel-cos6-x86_64
conda install -c anaconda libx11-devel-cos6-x86_64
conda install -c conda-forge libiconv
make distclean
LDFLAGS="-L$CONDA_PREFIX/lib -Wl,-rpath,$CONDA_PREFIX/lib -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu" \
./configure --prefix=$CONDA_PREFIX --enable-pythoninterp=no --enable-python3interp=yes --enable-gui=gtk2 \
--with-local-dir==$CONDA_PREFIX --with-gnome-libs=$CONDA_PREFIX/lib --with-gnome-includes=$CONDA_PREFIX/include
cat src/auto/config.mk | grep GUI The error details:
Any ideas on how to fix this and compile vim against anaconda with gui support? |
We don't provide any gtk libs I'm afraid and do not offer support for packages from this |
Your best bet for now would be to make 'CDT' packages from CentOS6's gtk suite and build against those and see what happens via:
Then build those packages and add them to your Can vim be built with Qt? We do have pretty good Qt packages, that's probably a lot less hassle. Otherwise, adding GTK (I'd go straight for 3 at least, but I don't know if that's ok for vim) to |
Unfortunately, no. The valid backends are: gtk2, gnome2, gtk3, motif, athena, neXtaw, photon, and carbon.
I'm relatively new to conda, and not much of a compile toolchain expert. I see tutorials for conda-build here: https://conda.io/docs/user-guide/tutorials/index.html so I'll look at those. Because I'll need to learn a lot to do that, I probably wont get to it anytime soon. In the meantime, I'm just curious about a few things (sorry if a few of these are stupid questions):
|
Well that's a lot of questions!
Since these come from users we are not able to guarantee much about them, esp. wrt binary compatibility with the packages we do build.
cos6 == centos6 == the minimum OS-level we support for Linux. It is gtk2, but it is not an end-user package. It is installed into our cross-compiler's sysroot so that we know that the symbols we link to from it will be present on the 'real' (system provided) library on centos6 and any distro that is compatible with that.
Yes it is supported. I forgot I added this gtk2 package to it though, it could save you some work but I've never used it as a means to building something that depends on much of gtk2 at runtime, it is only a build-time dependency to ensure compatibility, in this case with Qt 5's style stuff I think.
TIme and effort.
What do you mean by "Ubuntu"? Our compilers are different from a given distro's compilers in that they build software that will run on a fresh installation of CentOS6 (due to being pseudo-cross compilers and us providing CDT packages - the centos6 RPMs repackaged) but allow you to take advantage of C++11, 14 and 17 (due to being fairly modern). I this case I meant better along both of these axes since the reporter was using devtoolset-6 (which comes with a lot of compromises IMHO). |
Thank you for your prompt responses! All of this makes sense. For reference I was able to get gvim compiled and working using pkgw/label/superseded gtk3. The script I used to build is here: conda create -n vim80build python=3.6 gxx_linux-64 ncurses pkg-config autoconf automake cmake libtool gtk2-devel-cos6-x86_64 libx11-devel-cos6-x86_64 libiconv glib libxml2 libpng cairo
conda activate vim80build
conda install -c pkgw/label/superseded gtk3
make distclean
LDFLAGS="-L$CONDA_PREFIX/lib -Wl,-rpath,$CONDA_PREFIX/lib" ./configure --prefix=$CONDA_PREFIX --enable-pythoninterp=no --enable-python3interp=yes --enable-gui=gtk3 --with-local-dir==$CONDA_PREFIX
cat src/auto/config.mk | grep GUI
NCPUS=$(grep -c ^processor /proc/cpuinfo)
make -j$NCPUS It does spit out warning:
The menubar does not appear, but that's not a huge deal for me. Its more of an annoyance than a showstopper. Thanks for your suggestion to use GTK3. |
Great news! Seems you took to this stuff and got up to speed very well. It is worth asking @pkgw about the state of gtk3 on Now if I can be so bold, you may want to consider making a conda package for conda-forge next? |
I should really write some docs about this at some point because I actually have users ... My |
@pkgw I can install
I was trying to build vim without the conda compilers because they were breaking pytorch (which unfortunately requires on version of gcc < 7). However, I ran into an error and the solution I found requires gtk > 3.2 On related note, I've also had success building with gtk2 and without the conda compilers.
|
@Erotemic So, yes, to install the |
I came with such an issue today, and fixed it by doing so (after
|
A better pattern/fix would be:
.. because this will keep all of our other good |
A simple script, might be of interest for people who are not interested in messing with environments and compilers and don't particularly care about havin link-time optimization for vim (same as the disable lto comment early in the thread) :
|
Using Anaconda 5.0 / Miniconda 4.3.27.1 (i.e. compiled with GCC 7.2.0) and devtoolset-6 on CentOS (e.g. GCC 6.3.1) to compile extensions the following compilation error occurs:
lto1: fatal error: bytecode stream generated with LTO version 6.0 instead of the expected 5.2
All works fine when I disable link-time-optimization with
-fno-lto
.I'm not sure where the exact mismatch is (e.g. how LTO bytecode versions match up with compiler versions),
but thought it might be an issue that other Conda users may be running into.
The text was updated successfully, but these errors were encountered: