[aur-general] vim-youcompleteme-git does not build when android-studio is installed

Philip A Reimer antreimer at gmail.com
Wed Sep 4 11:10:00 EDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/04/2013 08:40 AM, Ivan Shapovalov wrote:
> On Wednesday 04 September 2013 at 15:31:32, Alexandre wrote:
>> On Sep 4, 2013 3:15 PM, "Ivan Shapovalov" <intelfx100 at gmail.com>
>> wrote:
>>> 
>>> On Wednesday 04 September 2013 at 07:47:29, Philip wrote:
>>>> Hi Alexandre,
>>>> 
>>>> Wouldn't it be possible in the PKGBUILD to use sed to remove 
>>>> /opt/android-sdk from the $PATH and export the PATH again?
>>>> 
>>>> Regards, Philip
>>>> 
>>>> On 09/04/2013 04:21 AM, Alexandre Ferrando wrote:
>>>>> First of all, excuse me if this is not the appropriate
>>>>> place for this issue, didn't know where it could fit
>>>>> better.
>>>>> 
>>>>> Now, the issue.
>>>>> 
>>>>> As said in the title, vim-youcompleteme-git [ 0 ] does not
>>>>> build when android-studio [ 1 ]  is installed throwing this
>>>>> error:
>>>>> 
>>>>> Linking CXX shared library 
>>>>> /dev/shm/vim-youcompleteme-git/src/YouCompleteMe/python/ycm_core.so
>>>>>
>>>>>
>>>>
>>>>> 
/opt/android-sdk/build-tools/18.0.1/libclang.so: could not read symbols:
>>>>> File in wrong format collect2: error: ld returned 1 exit
>>>>> status make[3]: *** 
>>>>> [/dev/shm/vim-youcompleteme-git/src/YouCompleteMe/python/ycm_core.so]
>>>>>
>>>>> 
Error 1 make[2]: *** [ycm/CMakeFiles/ycm_core.dir/all] Error 2
>>>>> make[1]: *** [ycm/CMakeFiles/ycm_core.dir/rule] Error 2
>>>>> make: *** [ycm_core] Error 2 ==> ERROR: A failure occurred
>>>>> in build(). Aborting...
>>>>> 
>>>>> This happens because android-studio adds /opt/android-sdk
>>>>> to the PATH.
>>>>> 
>>>>> Building in a clean chroot or without /opt/android-sdk
>>>>> added to the PATH or android-studio uninstalled is ok.
>>>>> 
>>>>> This, however, does not seem the ideal situation.
>>>>> 
>>>>> I don't know if other packages are affected by this as well
>>>>> because I can't think of another package that links against
>>>>> libclang.so at the moment, but, in this case, what could be
>>>>> done to solve it rather than using workarounds as
>>>>> mentioned?
>>>>> 
>>>>> Thank you in advance
>>>>> 
>>>>> [ 0 ]
>>>>> https://aur.archlinux.org/packages/vim-youcompleteme-git/ [
>>>>> 1 ] https://aur.archlinux.org/packages/android-studio/
>>>>> 
>>>> 
>>>> 
>>> 
>>> I'd suggest just resetting the PATH to 
>>> "/usr/local/sbin:/usr/local/bin:/usr/bin", which seems to be
>>> the sane
>> default
>>> on all uptodate Arch installations.
>>> 
>>> However, I can see that Android SDK/NDK add their entries to
>>> the end of
>> PATH,
>>> and AFAIK entries are sorted by priority, so something should
>>> be wrong...
>>> 
>>> -- // intelfx
>>> 
>> 
>> That's exactly what bothers me. In my PATH the Android stuff is
>> after the /usr/lib,  so why is it linking against the clang.so in
>> /opt?
>> 
>> Any idea on how to find the culprit?
> 
> Actually, I find it odd that it tries to find a *library* in an
> *executable* directory.
> 
> I did not look at the CMakeLists.txt for the project itself, but I
> guess it's buried deep there (or it could be CMake's own logic,
> FWIW).
> 
> Just reset the PATH. :)
> 
I think PATH is for executables and not libraries.
maybe looking into what LD_LIBRARY_PATH does or the output of
ldconfig -p | grep clang
Also look at the files /etc/ld.so.conf /etc/ld.so.conf.d/*
I've seen cmake or configure scripts having there own way of finding
libraries to link to. I have had to do something like this a couple of
times.
export LIBPNG_CFLAGS="-I/usr/include/libpng16"
export LIBPNG_LDFLAGS="-L/usr/lib -lpng16"
I hope this gives you a little idea of what to search for.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSJ01IAAoJEBXbY7Xe8exMvI8H/2i2kOBj1hNv4tq6PAs/igce
vIhdmQQsJpXfUJuwjNU+uqayUwRdpDlxp5UHYaP2zmv+o4fYxy+06kHO86gxe8Bv
qqDhyNEyCQay/tLBEMyzLlUOYu+Y9suz+qrJR5KPagfu/whZRaF63zi+7rhqNY6f
7ZnHt0DfCp+0VLLGIqCUy3WmOunzM3cQfszVqmS+jG9xFhBmdIl5hsZcGwtfdoXS
erEslONbOoS/CRSdKcivH0WqKeR6K2NYztSzzwZop+VZCmYuegC18W3H7+VO7Nl/
FCMMo08mPYUC3eo5SJNcAjacgNh0uq9X1g7dI8Q6ZX1ver8vHbf23H0o7ioi9w0=
=FRA4
-----END PGP SIGNATURE-----


More information about the aur-general mailing list