Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

LLVM/Clang compiler for MinGW

<< < (5/7) > >>

killerbot:
I did not do the export (export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH) , but it is in my normal path, is that not sufficient ?
And in the compiler settings of clang in CB, I even added that path as the dirs where the linker can go find libs.

I did create the 2 symlinks.

eranif:

--- Quote --- but it is in my normal path, is that not sufficient
--- End quote ---
Do you mean its in your PATH environment variable? LD_LIBRARY_PATH is for locating libraries during runtime
PATH is used to locate binaries (unlike Windows...)


--- Quote ---I even added that path as the dirs where the linker can go find libs
--- End quote ---
And from what I understood the linker did _find_ it. Its just that the runtime linker did not find them (it needs LD_LIBRARY_PATH)

Eran

killerbot:
yes, it is not in my PATH ;-) /usr/local/bin is

In a console I did :

--- Code: ---killerbot@XIII:~/Projects/TryOUt/ClangC11/Deliv/Debug> ./ClangC11
./ClangC11: error while loading shared libraries: libc++abi.so.1: cannot open shared object file: No such file or directory
killerbot@XIII:~/Projects/TryOUt/ClangC11/Deliv/Debug> export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
killerbot@XIII:~/Projects/TryOUt/ClangC11/Deliv/Debug> ./ClangC11
Segmentation fault

--- End code ---

for a simple

--- Code: ---#include <iostream>

int main()
{
    std::cout << "Hello world!" << std::endl;
    return 0;
}
--- End code ---

In /usr/local/lin I also have the boost libs from my distro. I think these can be found by programs that need it ?

In /usr/local/lib64, the codeblocks so's end up. And when CB is launched (which is located in /usr/local/bin) that one is however able to find it's so files, while that path is also not in $LD_LIBRARY_PATH

for me it is :


--- Code: ---echo $LD_LIBRARY_PATH
/usr/lib64/mpi/gcc/openmpi/lib64

--- End code ---

So it seems there might be a few things going wrong, explicit path specification is bneeded, while other libs in there or in lib64 can be found, and in the end crash

eranif:
BTW, which distro do you use?

I am using Ubuntu 12.10/64
and it is running without a problem...

Can you post the compiler output and the linker ?


Eran

osdt:

--- Quote from: killerbot on May 04, 2013, 07:59:19 pm ---build and installed clang and libc++ with your instructions, then let CB autodetect it, it finds it in /usr/local/clang.
...
Also my linux shell doesn't seem to know  about clang (yet), though I did ldconfig, and /usr/local/bin is already in my path (this is also where codeblocks executable is).

--- End quote ---
It's probably not installed in /usr/local. Try:

--- Code: ---find /usr/local -name clang++

--- End code ---


--- Quote from: killerbot on May 04, 2013, 07:59:19 pm ---EDIT : on the linking problem : added to Cb for clang compiler settings :
linker path : /usr/local/lib
link lib : c++

--- End quote ---
clang++ searches it's install-path/lib to find default libs.


--- Quote from: killerbot on May 04, 2013, 07:59:19 pm ---==> links but at run time :  error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory

--- End quote ---
A single call to ldconfig [/usr/local/lib] shoud do it. Check if '/usr/local/lib' is in the default lib-path:

--- Code: ---grep 'usr/local' /etc/ld.so.conf

--- End code ---

- osdt

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version