This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Linking failure within kdevelop

Tags: None
(comma "," separated)
thijsdetweede
Registered Member
Posts
20
Karma
0
OS

Linking failure within kdevelop

Mon Feb 27, 2012 6:26 pm
I've got a somewhat weird problem in KDevelop. When compiling my code (written in Fortran, using CMake to build and with MPI), everything goes well, upto the linking stage:
/home/thijs/git/uclales/build> make -j3
Linking Fortran executable ../uclales
/usr/bin/ld: warning: libopa.so.1, needed by /usr/lib64/mpich2/lib/libmpichf90.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libmpl.so.1, needed by /usr/lib64/mpich2/lib/libmpichf90.so, not found (try using -rpath or -rpath-link)
/usr/lib64/mpich2/lib/libmpich.so: undefined reference to `MPL_trid'
[...]
collect2: ld returned 1 exit status
make[2]: *** [uclales] Error 1
make[1]: *** [src/CMakeFiles/uclales.dir/all] Error 2
make: *** [all] Error 2
*** Failed ***

If I then go to the Konsole (potentially KDevelops internal konsole), all builts well. This was never a problem in the past (up to a few months ago), so I don't quite understand what to do. I've already tried to add an LD_RUN_PATH to Settings>Environment, but that didn't really help.

Fedora 16, KDE 4.8 and KDevelop 4.2.3 by the way.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Linking failure within kdevelop

Mon Feb 27, 2012 8:47 pm
I've no idea about the reason, but to debug it, you could put a few commands which print environment variables (echo $LD_LIBRARY_PATH, env, ...) into the makefile, maybe you'll notice something there?


I'm working on the KDevelop IDE.
User avatar
Milian Wolff
KDE Developer
Posts
61
Karma
1
OS

Re: Linking failure within kdevelop

Tue Feb 28, 2012 8:45 am
Yes that looks odd indeed. does that rely on some env vars set in your ~/.profile or similar?

Anyhow, we'd need a way to reproduce this to figure out a solution. Please post a bug report on bugs.kde.org if you find a small project that exhibits this behavior.

cheers


current KDE projects: Quanta, KDevelop, Kate
thijsdetweede
Registered Member
Posts
20
Karma
0
OS

Re: Linking failure within kdevelop

Tue Feb 28, 2012 9:29 am
Yes, LD_LIBRARY_PATH is set in .bashrc - Not clean at all, but that's to counter the mpi wrapper on fedora that apparently cannot set its own libraries. That I may consider a bug, but not KDevelops :)

So the question boils down to: (How) can I set an environment variable in KDevelop? Putting variable LD_LIBRARY_PATH with value /usr/lib64/mpich2/lib doesnt seem to do it.
User avatar
Milian Wolff
KDE Developer
Posts
61
Karma
1
OS
using 4.3 at least (final will be released soon) you can configure the cmake configure environment:

configure project -> cmake -> advanced -> configure environment -> wrench button -> "some name" -> add group -> green "+" button -> ...


current KDE projects: Quanta, KDevelop, Kate
thijsdetweede
Registered Member
Posts
20
Karma
0
OS

Re: Linking failure within kdevelop

Tue Feb 28, 2012 4:13 pm
OK, thanks. My home computer has Arch on it, which put me on the 4.3 RCs already. Will check tonight whether I can at least manipulate the environment.
thijsdetweede
Registered Member
Posts
20
Karma
0
OS

Re: Linking failure within kdevelop

Tue Mar 20, 2012 4:42 pm
Somewhat later than expected, but Fedora just updated Kdevelop as well, so this is testable. And suggestion works. Thanks!


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell