possible libtool 2.2.6 issue

2009-03-30 Thread David Nichols

hi,

I suspect I may have found a bug in libtool on Darwin/OSX, although  
it's possible that I am not using automake, etc correctly.


Basically I'm trying to compile my qt module for qore (https://trac.macports.org/browser/trunk/dports/lang/qore/Portfile 
) against the qt4-mac port.


I have modified my configure.ac script to do more generic framework  
detection, and set up the CPP_FLAGS and LD_FLAGS properly for  
frameworks in non-standard directories (such as /opt/local/Library/ 
Framework, where the QT libraries are placed by default from macports).


While building the qt-core module, I build a shared library and link  
it to the QtCore framework.  Then I build a module that links to the  
shared library (the reason I do this is that I have other modules that  
depend on the first module, and in order to share code and symbols  
easier, I put all the shared code in the shared library).


However, libtool is creating the .la file for the shared library  
without the -Fframework-dir option in the inherited_linker_flags  
line, although the -framework QtCore is there.


So when the module is created, it fails in the link step because the  
QtCore framework cannot be found, because the -Fframework-dir option  
is not present in the inherited_linker_flags line in the la file.


I have tested building the project by manually editing the  
inherited_linker_flags line for the shared library, by both adding the  
missing -Fframework-dir option and by removing the -framework QtCore  
line, and it works both ways.  So I guess either the -framework option  
should not be inherited or the -F option should be inherited, but not  
one without the other.


I am not able to fix this bug myself, I don't understand entirely how  
libtool works, and I'm afraid I'm not even an expert user of it.


Anyway, I hope someone can help me with this.

I'd like to be able to release a port for my qt module for qore, but I  
have to make sure that macports users can build it automatically first.


thanks again
David


___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: possible libtool 2.2.6 issue

2009-03-30 Thread Peter O'Gorman
David Nichols wrote:

 
 I have tested building the project by manually editing the
 inherited_linker_flags line for the shared library, by both adding the
 missing -Fframework-dir option and by removing the -framework QtCore
 line, and it works both ways.  So I guess either the -framework option
 should not be inherited or the -F option should be inherited, but not
 one without the other.

Can you not configure your project with ./configure
LDFLAGS=-L/opt/local/lib -F/opt/local/Library/Frameworks ?

I think the whole adding -framework foo to inherited_linker_flags could
be the real bug (and yes, I am the one who added inherited_linker_flags
to libtool, and the -framework support), because it adds frameworks
directly and since frameworks can never be static archives, it is quite
unnecessary. Why I did this I do not remember, I am sure that I thought
it was a good reason at the time though. :(

Peter
-- 
Peter O'Gorman
http://pogma.com
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users