I'm not 100% sure how GNUStep frameworks are supposed to be linked but fact is 
under linux, it looks for shared libraries in all which is referenced in 
/etc/ld.so.conf (and /etc/ld.so.conf.d/* ). On the mac the path to a shared 
library is embedded in the library itself so when you link to it, the binary 
will remember the absolute path (or relative path to the binary). This is not 
the case under Linux.

I compile my libraries the way that they end up in /usr/local/lib and the 
headers into /usr/local/include/<frameworkname>/. That way they always work. 
But its not really the way OS X or GNUStep frameworks are supposed to work as 
now we dont have bundles anymore but more traditional libraries as in C.

So for the shared libraries to be considered by the linux dynamic library 
linker at start of a binary, the ldconfig path's have to be set (maybe over an 
environment variable which is set by the gnustep startup?). And that seems not 
to happen in your case. So if you pass it at link time, it can link but at 
runtime it cant find it anymore.

> On 2 May 2018, at 16:00, Andreas Höschler <[email protected]> wrote:
> 
> Hi Andreas,
> 
>> could it simply be that your /etc/ld.so.conf setup does not include the 
>> needed paths to find SRFoundation framework or you didnt run ldconfig after 
>> installing/updating the shared library?
> 
> Yes, that can be. I have never done that (on MacOSX and GNUStep). And it 
> worked anyway in the past.  I did it now
> 
>       ldconfig
>       ls /usr/local/lib/
> 
> GNUstep                       libFaxServiceFoundation.so.1.0.0  
> libgnustep-gui.so.0.26.2     libSRAppKit.so.1.0.0  libSREnterprise.so.1.0.0  
> libSRInterface.so.1.0.0  libSRObjects.so.1.0.0
> libESMFoundation.so           libgnustep-base.so                
> libLOCommunication.so        libSRDesign.so        libSRFoundation.so        
> libSRMapKit.so           libSRQuery.so
> libESMFoundation.so.1         libgnustep-base.so.1.25           
> libLOCommunication.so.1      libSRDesign.so.1      libSRFoundation.so.1      
> libSRMapKit.so.1         libSRQuery.so.1
> libESMFoundation.so.1.0.0     libgnustep-base.so.1.25.1         
> libLOCommunication.so.1.0.0  libSRDesign.so.1.0.0  libSRFoundation.so.1.0.0  
> libSRMapKit.so.1.0.0     libSRQuery.so.1.0.0
> libFaxServiceFoundation.so    libgnustep-gui.so                 
> libSRAppKit.so               libSREnterprise.so    libSRInterface.so         
> libSRObjects.so          python2.7
> libFaxServiceFoundation.so.1  libgnustep-gui.so.0.26            
> libSRAppKit.so.1             libSREnterprise.so.1  libSRInterface.so.1       
> libSRObjects.so.1        python3.5
> 
> and see *.so for all my frameworks here.
> 
> I redid
> 
>       make clean
>       make messages=yes install
> 
> for my TabTest application and get
> 
>       find /usr/local -name TabTest
> 
> /usr/local/bin/TabTest
> /usr/local/lib/GNUstep/Applications/TabTest.app/TabTest
> 
> and when starting the thing with
> 
>       openapp TabTest
> 
> I get
> 
>       NSInvalidArgumentException:NSString(class) does not recognize 
> stringByChaining:count:
> 
> But this method is implemented in SRFoundation:
> 
> + (NSString *)stringByChaining:(NSString *)string count:(int)count
> {
> ...
> }

Now it more sounds like it wasnt linked at all

what does 
        ldd /usr/local/lib/GNUstep/Applications/TabTest.app/TabTest

say?
Does it include the corresponding libraries?

_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to