LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-07-2011, 08:29 PM   #1
capo
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
Make: Building project with different linker and compiler


I am trying to recompile a large open source project with the Nvidia Cuda Compiler: 'nvcc' (http://en.wikipedia.org/wiki/CUDA).

nvcc supports all the compile flags that gcc does but not all of the linking options. This shouldn't be a problem however as nvcc generates object files that are compatible with gcc and I should hence be able to compile with nvcc and then link with gcc (linking against the CUDA library).

To compile with nvcc I use:

./configure CC=nvcc

Which successfully creates make files that use nvcc to compile. But the Configuration script does not seem to honor LD=gcc in the same way, ie:

./configure CC=nvcc LD=gcc

still tries to link everything with nvcc which promptly fails because nvcc does not support the option '-soname' without which the project will not link correctly.

What am I doing wrong? How can tell the config script to link with gcc?

Last edited by capo; 06-07-2011 at 08:33 PM.
 
Old 06-08-2011, 07:32 AM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hello,

We have to know more about the project you are trying to compile. I bet that your problem is about how build system for this project has been written. Indeed to link the project they may have done something like: "$CC $LDFLAGS" and then it's up to CC to invoke the correct linker. Or maybe they did something like: LD=$CC which overwrite your settings and we can imagine a lot of other scenarii which could explain your problem.
So without digging into your project build system, you'll never know.

Kind regards

Oliv'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Static linker with make bertlef Programming 1 10-02-2010 11:00 PM
Linker issues and make dpeterson3 Programming 1 02-11-2010 09:15 PM
[SOLVED] cryptic linker error (i really dont like linker errors); smeezekitty Programming 2 09-19-2009 02:21 AM
Linker does not catch undefined functions when building GStreamer plugin asaeed Linux - Software 0 04-07-2008 05:11 PM
Building compiler from source corbis_demon Programming 2 06-08-2005 08:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration