possible libtool 2.2.6 issue

David Nichols davidnichols at macports.org
Mon Mar 30 00:38:49 PDT 2009


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 -F<framework-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 -F<framework-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 -F<framework-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




More information about the macports-users mailing list