Re: Linking frameworks does not work

2018-05-02 Thread Richard Frith-Macdonald


> On 2 May 2018, at 16:10, Andreas Höschler  wrote:
> 
> 
> Thanks a lot. I added
> 
>[SRMailDelivery sendMailFrom:@"asas" to:@"asas" subject:@"asas" 
> body:@"asas" attachmentsAndFilenames:nil];
> 
> to the code and this indeed forced SRFoundation to be linked in. The 
> execption happens now later when trying to call a category method of just 
> another framework. 
> 
> This is indeed painful and annoying and has not always been that way in the 
> past, not on Solaris with GNUstep make and also not on Debian and Kubuntu and 
> definitely not on MacOSX. 

I think it *has* always been the case on GNU/Linux (which includes Debian and 
Kubuntu) as it's a function of how the system tools resolve symbols, not a 
function of gnustep-make.
Certainly I recall having to explicitly reference classes to do that in the 
1990s

> Does this mean that I have to define a dummy class in each framework and 
> include calls to these dummy classes for every 12 frameworks I have in use at 
> app launch? How annoying and dirty is that? :-( There is no cleaner solution?

Lookingt at gnustep-make (frameword.make), it creates a dummy class in each 
framework anyway (to hold information needed by NSBundle).  Perhaps you could 
leverage that.
___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Andreas Höschler
Hi Wolfgang,

>>   [NSString stringByChaining:@"ass" count:3];
>> 
>> ...
>> 
>>   [pool release];
>> 
>>   return NSApplicationMain (argc, argv);
>> }
>> 
>> Is this directly enough?
> 
> No.
> 
>> The method NSString::stringByChaining:count:] is defined/implemented in my 
>> SRFoundation framework.
> 
> True. But when looking for a reference to resolve the NSString class, the 
> linker is stubbornly looking for the class definition itself (which is found 
> in gnustep-base) and not for any categories defined for that class. Indeed it 
> can be fairly painful to get categories linked from frameworks/libraries into 
> an executable. You really need a class implementation and not a category (or 
> a global variable or function) to enforce linking.

Thanks a lot. I added

   [SRMailDelivery sendMailFrom:@"asas" to:@"asas" subject:@"asas" body:@"asas" 
attachmentsAndFilenames:nil];

to the code and this indeed forced SRFoundation to be linked in. The execption 
happens now later when trying to call a category method of just another 
framework. 

This is indeed painful and annoying and has not always been that way in the 
past, not on Solaris with GNUstep make and also not on Debian and Kubuntu and 
definitely not on MacOSX. 

Does this mean that I have to define a dummy class in each framework and 
include calls to these dummy classes for every 12 frameworks I have in use at 
app launch? How annoying and dirty is that? :-( There is no cleaner solution?

Best wishes,

 Andreas



___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Andreas Höschler
Hi Andreas,

> 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//. 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.


Thanks for this explanantion.

I added

/usr/local/lib

to /etc/ld.so.conf. It now has the content

include /etc/ld.so.conf.d/*.conf
/usr/local/lib

and called

ldconfig

No avail. Starting the app gives me the same does not recognize selector 
exception!? :-(

Regards,

 Andreas

___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Wolfgang Lux


> Am 02.05.2018 um 15:45 schrieb Andreas Höschler :
> 
> Hi Wolfgang,
> 
>> On 2. May 2018, at 15:36, Wolfgang Lux  wrote:
>> 
>> Selectors do not count here. They are only resolved at runtime not a link 
>> time.
>> You would need an explicit reference to a class, function or global variable 
>> from your frameworks inside the code of the test application to have the 
>> linker include those libraries in the executable.
> 
> int main (int argc, const char **argv, char** env)
>   {
>NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
>
>[NSApplication sharedApplication];
>
>controller = [[Controller  alloc] init];
>NSLog(@"controller %@", controller);
>[NSApp setDelegate:controller];
>
>[NSString stringByChaining:@"ass" count:3];
> 
> ...
> 
>[pool release];
> 
>return NSApplicationMain (argc, argv);
> }
> 
> Is this directly enough?

No.

> The method NSString::stringByChaining:count:] is defined/implemented in my 
> SRFoundation framework.

True. But when looking for a reference to resolve the NSString class, the 
linker is stubbornly looking for the class definition itself (which is found in 
gnustep-base) and not for any categories defined for that class. Indeed it can 
be fairly painful to get categories linked from frameworks/libraries into an 
executable. You really need a class implementation and not a category (or a 
global variable or function) to enforce linking.

Wolfgang


___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Andreas Fink
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//. 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  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.solibSRDesign.solibSRFoundation.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.solibgnustep-gui.so 
> libSRAppKit.so   libSREnterprise.solibSRInterface.so 
> libSRObjects.so  python2.7
> libFaxServiceFoundation.so.1  libgnustep-gui.so.0.26
> libSRAppKit.so.1 libSREnterprise.so.1  libSRInterface.so.1   
> libSRObjects.so.1python3.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
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Andreas Höschler
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.solibSRDesign.solibSRFoundation.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.solibgnustep-gui.so libSRAppKit.so  
 libSREnterprise.solibSRInterface.so libSRObjects.so
  python2.7
libFaxServiceFoundation.so.1  libgnustep-gui.so.0.26
libSRAppKit.so.1 libSREnterprise.so.1  libSRInterface.so.1   
libSRObjects.so.1python3.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
{
...
}


Thanks,

 Andreas

___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Andreas Fink
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?



> On 2 May 2018, at 15:45, Andreas Höschler  wrote:
> 
> Hi Wolfgang,
> 
>> On 2. May 2018, at 15:36, Wolfgang Lux > > wrote:
>> 
>> Selectors do not count here. They are only resolved at runtime not a link 
>> time.
>> You would need an explicit reference to a class, function or global variable 
>> from your frameworks inside the code of the test application to have the 
>> linker include those libraries in the executable.
> 
> int main (int argc, const char **argv, char** env)
>   {
>NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
>
>[NSApplication sharedApplication];
>
>controller = [[Controller  alloc] init];
>NSLog(@"controller %@", controller);
>[NSApp setDelegate:controller];
>
>[NSString stringByChaining:@"ass" count:3];
> 
> ...
> 
>[pool release];
> 
>return NSApplicationMain (argc, argv);
> }
> 
> Is this directly enough? The method NSString::stringByChaining:count:] is 
> defined/implemented in my SRFoundation framework. When I do
> 
>   make 
> 
> I get a resulting app and starting it leads to "NSString does not recognize 
> selector stringByChaining:count: exception. When I instead build with
> 
>   make shared=no
> 
> I get
> 
> ...
> /usr/bin/ld: cannot find -lSRFoundation
> ...
> 
> and buolding the app fails!???
> 
> Thanks,
> 
>  Andreas
> 
> 
> 
> ___
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep

___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Andreas Höschler
Hi all,

additonal info. I have

find /usr/local -name "*.so"

/usr/local/lib/libgnustep-gui.so
/usr/local/lib/libSRMapKit.so
/usr/local/lib/libSRObjects.so
/usr/local/lib/libESMFoundation.so
/usr/local/lib/libFaxServiceFoundation.so
/usr/local/lib/libSRAppKit.so
/usr/local/lib/libSRDesign.so
/usr/local/lib/GNUstep/Frameworks/SRObjects.framework/Versions/1/libSRObjects.so
/usr/local/lib/GNUstep/Frameworks/SRObjects.framework/libSRObjects.so
/usr/local/lib/GNUstep/Frameworks/SRInterface.framework/Versions/1/libSRInterface.so
/usr/local/lib/GNUstep/Frameworks/SRInterface.framework/libSRInterface.so
/usr/local/lib/GNUstep/Frameworks/FaxServiceFoundation.framework/Versions/1/libFaxServiceFoundation.so
/usr/local/lib/GNUstep/Frameworks/FaxServiceFoundation.framework/libFaxServiceFoundation.so
/usr/local/lib/GNUstep/Frameworks/LOCommunication.framework/Versions/1/libLOCommunication.so
/usr/local/lib/GNUstep/Frameworks/LOCommunication.framework/libLOCommunication.so
/usr/local/lib/GNUstep/Frameworks/SRAppKit.framework/Versions/1/libSRAppKit.so
/usr/local/lib/GNUstep/Frameworks/SRAppKit.framework/libSRAppKit.so
/usr/local/lib/GNUstep/Frameworks/SRDesign.framework/Versions/1/libSRDesign.so
/usr/local/lib/GNUstep/Frameworks/SRDesign.framework/libSRDesign.so
/usr/local/lib/GNUstep/Frameworks/SRMapKit.framework/libSRMapKit.so
/usr/local/lib/GNUstep/Frameworks/SRMapKit.framework/Versions/1/libSRMapKit.so
/usr/local/lib/GNUstep/Frameworks/SRFoundation.framework/Versions/1/libSRFoundation.so
/usr/local/lib/GNUstep/Frameworks/SRFoundation.framework/libSRFoundation.so
/usr/local/lib/GNUstep/Frameworks/SRQuery.framework/Versions/1/libSRQuery.so
/usr/local/lib/GNUstep/Frameworks/SRQuery.framework/libSRQuery.so
/usr/local/lib/GNUstep/Frameworks/ESMFoundation.framework/Versions/1/libESMFoundation.so
/usr/local/lib/GNUstep/Frameworks/ESMFoundation.framework/libESMFoundation.so
/usr/local/lib/GNUstep/Frameworks/SREnterprise.framework/Versions/1/libSREnterprise.so
/usr/local/lib/GNUstep/Frameworks/SREnterprise.framework/libSREnterprise.so
/usr/local/lib/libSRQuery.so
/usr/local/lib/libLOCommunication.so
/usr/local/lib/libgnustep-base.so
/usr/local/lib/libSRFoundation.so
/usr/local/lib/libSREnterprise.so
/usr/local/lib/libSRInterface.so

find /usr/local -name "*.a"



The path /usr/local/lib is inmy gcc (link) command:

root@RetinaUbuntu16:/usr/src/FileHub/TabTest# gcc -static -rdynamic  
-pthread  -fgnu-runtime -o /Build/TabTest/TabTest.app/./TabTest 
/Build/TabTest/obj/TabTest.obj/Controller.m.o 
/Build/TabTest/obj/TabTest.obj/DocumentController.m.o 
/Build/TabTest/obj/TabTest.obj/main.m.o  -L/usr/local/lib -lESMFoundation 
-lSRAppKit -lSRDesign -lSREnterprise -lSRFoundation -lSRInterface -lSRMapKit 
-lSRObjects -lSRQuery-L/root/GNUstep/Library/Libraries -L/usr/local/lib   
-L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/lib/i386-linux-gnu  
-lESMFoundation -lSRAppKit -lSRDesign -lSREnterprise -lSRFoundation 
-lSRInterface -lSRMapKit -lSRObjects -lSRQuery  -lgnustep-gui-lgnustep-base 
   -lobjc   -lgmp   -lgnutls -lxslt -lxml2 -lffi -lrt -ldl  -lpthread -lz 
-licui18n -licuuc -licudata  -lm

I still get

/usr/bin/ld: cannot find -lESMFoundation
/usr/bin/ld: cannot find -lSRAppKit
/usr/bin/ld: cannot find -lSRDesign
/usr/bin/ld: cannot find -lSREnterprise
/usr/bin/ld: cannot find -lSRFoundation
/usr/bin/ld: cannot find -lSRInterface
/usr/bin/ld: cannot find -lSRMapKit
/usr/bin/ld: cannot find -lSRObjects
/usr/bin/ld: cannot find -lSRQuery
/usr/bin/ld: cannot find -lESMFoundation
/usr/bin/ld: cannot find -lSRAppKit
...

Thanks,

 Andreas



___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Andreas Höschler
Hi Wolfgang,

> On 2. May 2018, at 15:36, Wolfgang Lux  wrote:
> 
> Selectors do not count here. They are only resolved at runtime not a link 
> time.
> You would need an explicit reference to a class, function or global variable 
> from your frameworks inside the code of the test application to have the 
> linker include those libraries in the executable.

int main (int argc, const char **argv, char** env)
  {
   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
   
   [NSApplication sharedApplication];
   
   controller = [[Controller  alloc] init];
   NSLog(@"controller %@", controller);
   [NSApp setDelegate:controller];
   
   [NSString stringByChaining:@"ass" count:3];

...

   [pool release];

   return NSApplicationMain (argc, argv);
}

Is this directly enough? The method NSString::stringByChaining:count:] is 
defined/implemented in my SRFoundation framework. When I do

make 

I get a resulting app and starting it leads to "NSString does not recognize 
selector stringByChaining:count: exception. When I instead build with

make shared=no

I get

...
/usr/bin/ld: cannot find -lSRFoundation
...

and buolding the app fails!???

Thanks,

 Andreas



___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Wolfgang Lux


> Am 02.05.2018 um 15:30 schrieb Andreas Höschler :
> 
> Hi Wolfgang,
> 
>>> I have Window Maker running now and Fred resize.app but still wasn't able 
>>> to get one of my own apps to work that need to be linked against my 
>>> frameworks. The test app links against gui and base but not any of the 
>>> listed frameworks SRFoundation, SREnterprise,...
>> 
>> That very much sounds like the code of your test app does not use any code 
>> from these frameworks.
>> Keep in mind that libraries linked with -l options are used only to resolve 
>> unresolved symbols in the code. If a library does not provide any such 
>> symbols it is ignored and will not be included in the final executable.
> 
> That's not the case. The code is used. When executing the resulting binary I 
> get tons of "... does not recognize selector ..." exceptions!? :-(

Selectors do not count here. They are only resolved at runtime not a link time.
You would need an explicit reference to a class, function or global variable 
from your frameworks inside the code of the test application to have the linker 
include those libraries in the executable.

Wolfgang


___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Linking frameworks does not work

2018-05-02 Thread Andreas Höschler
Hi Wolfgang,

>> I have Window Maker running now and Fred resize.app but still wasn't able to 
>> get one of my own apps to work that need to be linked against my frameworks. 
>> The test app links against gui and base but not any of the listed frameworks 
>> SRFoundation, SREnterprise,...
> 
> That very much sounds like the code of your test app does not use any code 
> from these frameworks.
> Keep in mind that libraries linked with -l options are used only to resolve 
> unresolved symbols in the code. If a library does not provide any such 
> symbols it is ignored and will not be included in the final executable.

That's not the case. The code is used. When executing the resulting binary I 
get tons of "... does not recognize selector ..." exceptions!? :-(

For test purposes I tried

make messages=yes shared=no

This seems to add -static to the gcc statement and immediately produces errors 
in the link phase.

gcc -static -rdynamic  -pthread  -fgnu-runtime -o 
/Build/TabTest/TabTest.app/./TabTest \
/Build/TabTest/obj/TabTest.obj/Controller.m.o 
/Build/TabTest/obj/TabTest.obj/DocumentController.m.o 
/Build/TabTest/obj/TabTest.obj/main.m.o   -lESMFoundation -lSRAppKit -lSRDesign 
-lSREnterprise -lSRFoundation -lSRInterface -lSRMapKit -lSRObjects -lSRQuery
-L/root/GNUstep/Library/Libraries -L/usr/local/lib   -L/usr/local/lib 
-L/usr/local/lib -L/usr/local/lib -L/usr/lib/i386-linux-gnu  -lESMFoundation 
-lSRAppKit -lSRDesign -lSREnterprise -lSRFoundation -lSRInterface -lSRMapKit 
-lSRObjects -lSRQuery  -lgnustep-gui-lgnustep-base-lobjc   -lgmp   
-lgnutls -lxslt -lxml2 -lffi -lrt -ldl  -lpthread -lz -licui18n -licuuc 
-licudata  -lm
/usr/bin/ld: cannot find -lESMFoundation
/usr/bin/ld: cannot find -lSRAppKit
/usr/bin/ld: cannot find -lSRDesign
/usr/bin/ld: cannot find -lSREnterprise
/usr/bin/ld: cannot find -lSRFoundation
/usr/bin/ld: cannot find -lSRInterface
/usr/bin/ld: cannot find -lSRMapKit
/usr/bin/ld: cannot find -lSRObjects
/usr/bin/ld: cannot find -lSRQuery
/usr/bin/ld: cannot find -lESMFoundation
/usr/bin/ld: cannot find -lSRAppKit
/usr/bin/ld: cannot find -lSRDesign
/usr/bin/ld: cannot find -lSREnterprise
/usr/bin/ld: cannot find -lSRFoundation
/usr/bin/ld: cannot find -lSRInterface
/usr/bin/ld: cannot find -lSRMapKit
/usr/bin/ld: cannot find -lSRObjects
/usr/bin/ld: cannot find -lSRQuery
/usr/bin/ld: cannot find -lgnustep-gui
/usr/bin/ld: cannot find -lgnustep-base
collect2: error: ld returned 1 exit status

ld does not find my libs!?? The frameworks are all built sucessfully with 
GNUstep make. If I remember correctly in earlier versions of GNustep make there 
weren't only the files

/usr/local/include/ESMFoundation
/usr/local/lib/GNUstep/Frameworks/ESMFoundation.framework/Versions/1/ESMFoundation
/usr/local/lib/GNUstep/Frameworks/ESMFoundation.framework/ESMFoundation

for a framework ESMFoundation but also a copy or link of ESMFoundation in a 
GNUstep Libraries directory. This is no longer the case and might be related to 
the problem!?

I did

   ln -s 
/usr/local/lib/GNUstep/Frameworks/ESMFoundation.framework/ESMFoundation 
/usr/local/lib/GNUstep/Libraries

   ls -l /usr/local/lib/GNUstep/Libraries

lrwxrwxrwx 1 root root   71 Mai  2 14:30 ESMFoundation -> 
/usr/local/lib/GNUstep/Frameworks/ESMFoundation.framework/ESMFoundation
drwxr-xr-x 3 root root 4096 Mai  2 11:56 gnustep-base
drwxr-xr-x 3 root root 4096 Mai  2 11:57 gnustep-gui

but this had no healing effect.

make messages=yes shared=no

still gives me

This is gnustep-make 2.7.0. Type 'make print-gnustep-make-help' for help.
Running in gnustep-make version 2 strict mode.
Making all for app TabTest...
gcc -static -rdynamic  -pthread  -fgnu-runtime -o 
/Build/TabTest/TabTest.app/./TabTest \
/Build/TabTest/obj/TabTest.obj/Controller.m.o 
/Build/TabTest/obj/TabTest.obj/DocumentController.m.o 
/Build/TabTest/obj/TabTest.obj/main.m.o   -lESMFoundation -lSRAppKit -lSRDesign 
-lSREnterprise -lSRFoundation -lSRInterface -lSRMapKit -lSRObjects -lSRQuery
-L/root/GNUstep/Library/Libraries -L/usr/local/lib   -L/usr/local/lib 
-L/usr/local/lib -L/usr/local/lib -L/usr/lib/i386-linux-gnu  -lESMFoundation 
-lSRAppKit -lSRDesign -lSREnterprise -lSRFoundation -lSRInterface -lSRMapKit 
-lSRObjects -lSRQuery  -lgnustep-gui-lgnustep-base-lobjc   -lgmp   
-lgnutls -lxslt -lxml2 -lffi -lrt -ldl  -lpthread -lz -licui18n -licuuc 
-licudata  -lm
/usr/bin/ld: cannot find -lESMFoundation
/usr/bin/ld: cannot find -lSRAppKit
/usr/bin/ld: cannot find -lSRDesign
/usr/bin/ld: cannot find -lSREnterprise
/usr/bin/ld: cannot find -lSRFoundation
/usr/bin/ld: cannot find -lSRInterface
/usr/bin/ld: cannot find -lSRMapKit
/usr/bin/ld: cannot find -lSRObjects
/usr/bin/ld: cannot find -lSRQuery
/usr/bin/ld: cannot find -lESMFoundation
/usr/bin/ld: cannot find -lSRAppKit
/usr/bin/ld: cannot find -lSRDesign
/usr/bin/ld: cannot find -lSREnterprise
/usr/bin/ld: cannot find -lSRFoundation
/usr/bin/ld: cannot find -lSRInterface

Re: Linking frameworks does not work

2018-05-02 Thread Andreas Höschler
Hi all,

I recognized that I have

/usr/local/lib/GNUstep/Libraries:
gnustep-base  gnustep-gui

but no binaries for my frameworks anywhere in the GNustep tree execpt

/usr/local/include/ESMFoundation
/usr/local/lib/GNUstep/Frameworks/ESMFoundation.framework/Versions/1/ESMFoundation
/usr/local/lib/GNUstep/Frameworks/ESMFoundation.framework/ESMFoundation

I tried to add  -L/usr/local/include to the following statement,

gcc -static -rdynamic  -pthread  -fgnu-runtime -o 
/Build/TabTest/TabTest.app/./TabTest 
/Build/TabTest/obj/TabTest.obj/Controller.m.o 
/Build/TabTest/obj/TabTest.obj/DocumentController.m.o 
/Build/TabTest/obj/TabTest.obj/main.m.o  -L/usr/local/include -lESMFoundation 
-lSRAppKit -lSRDesign -lSREnterprise -lSRFoundation -lSRInterface -lSRMapKit 
-lSRObjects -lSRQuery-L/root/GNUstep/Library/Libraries -L/usr/local/lib   
-L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/lib/i386-linux-gnu  
-lESMFoundation -lSRAppKit -lSRDesign -lSREnterprise -lSRFoundation 
-lSRInterface -lSRMapKit -lSRObjects -lSRQuery  -lgnustep-gui-lgnustep-base 
   -lobjc   -lgmp   -lgnutls -lxslt -lxml2 -lffi -lrt -ldl  -lpthread -lz 
-licui18n -licuuc -licudata  -lm

but I still get 

/usr/bin/ld: cannot find -lESMFoundation
/usr/bin/ld: cannot find -lSRAppKit
/usr/bin/ld: cannot find -lSRDesign
/usr/bin/ld: cannot find -lSREnterprise
/usr/bin/ld: cannot find -lSRFoundation
/usr/bin/ld: cannot find -lSRInterface
/usr/bin/ld: cannot find -lSRMapKit
/usr/bin/ld: cannot find -lSRObjects
/usr/bin/ld: cannot find -lSRQuery
/usr/bin/ld: cannot find -lESMFoundation
/usr/bin/ld: cannot find -lSRAppKit
/usr/bin/ld: cannot find -lSRDesign
/usr/bin/ld: cannot find -lSREnterprise
/usr/bin/ld: cannot find -lSRFoundation
/usr/bin/ld: cannot find -lSRInterface
/usr/bin/ld: cannot find -lSRMapKit
/usr/bin/ld: cannot find -lSRObjects
/usr/bin/ld: cannot find -lSRQuery
/usr/bin/ld: cannot find -lgnustep-gui
/usr/bin/ld: cannot find -lgnustep-base
collect2: error: ld returned 1 exit status

Any idea?

Thanks,

 Andreas


> On 2. May 2018, at 12:42, Andreas Höschler  wrote:
> 
> Hi all,
> 
> I have Window Maker running now and Fred resize.app but still wasn't able to 
> get one of my own apps to work that need to be linked against my frameworks. 
> The test app links against gui and base but not any of the listed frameworks 
> SRFoundation, SREnterprise,...
> 
>   make messages=yes
> 
> gives me
> 
> ...
> 
> gcc  -rdynamic  -pthread  -fgnu-runtime -o 
> /Build/TabTest/TabTest.app/./TabTest \
> /Build/TabTest/obj/TabTest.obj/Controller.m.o 
> /Build/TabTest/obj/TabTest.obj/DocumentController.m.o 
> /Build/TabTest/obj/TabTest.obj/main.m.o   
> -L/root/GNUstep/Library/Libraries -L/usr/local/lib   -lESMFoundation 
> -lSRAppKit -lSRDesign -lSREnterprise -lSRFoundation -lSRInterface -lSRMapKit 
> -lSRObjects -lSRQuery  -lgnustep-gui-lgnustep-base-lobjc   -lm
> ...
> 
> but ldd shows none of the frameworks SRFoundation, SREnterprise,... in its 
> output:
> 
> ldd /usr/local/lib/GNUstep/Applications/TabTest.app/TabTest
> 
>   linux-gate.so.1 =>  (0xb7fb9000)
>   libgnustep-gui.so.0.26 => /usr/local/lib/libgnustep-gui.so.0.26 
> (0xb7a3d000)
>   libgnustep-base.so.1.25 => /usr/local/lib/libgnustep-base.so.1.25 
> (0xb74b8000)
>   libobjc.so.4 => /usr/lib/i386-linux-gnu/libobjc.so.4 (0xb7483000)
>   libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7466000)
>   libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb72af000)
>   libicuuc.so.55 => /usr/lib/i386-linux-gnu/libicuuc.so.55 (0xb7119000)
>   libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb70ee000)
>   libtiff.so.5 => /usr/lib/i386-linux-gnu/libtiff.so.5 (0xb7072000)
>   libjpeg.so.8 => /usr/lib/i386-linux-gnu/libjpeg.so.8 (0xb7013000)
>   libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb6fbd000)
>   libgnutls.so.30 => /usr/lib/i386-linux-gnu/libgnutls.so.30 (0xb6e65000)
>   libxslt.so.1 => /usr/lib/i386-linux-gnu/libxslt.so.1 (0xb6e2)
>   libxml2.so.2 => /usr/lib/i386-linux-gnu/libxml2.so.2 (0xb6c3f000)
>   libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb6c36000)
>   libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb6c3)
>   libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb6c15000)
>   libicui18n.so.55 => /usr/lib/i386-linux-gnu/libicui18n.so.55 
> (0xb69a2000)
>   libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6985000)
>   /lib/ld-linux.so.2 (0xb7fbb000)
>   libicudata.so.55 => /usr/lib/i386-linux-gnu/libicudata.so.55 
> (0xb50cd000)
>   libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb4f55000)
>   liblzma.so.5 => /lib/i386-linux-gnu/liblzma.so.5 (0xb4f2f000)
>   libjbig.so.0 => /usr/lib/i386-linux-gnu/libjbig.so.0 (0xb4f2)
>   libp11-kit.so.0 => /usr/lib/i386-linux-gnu/libp11-kit.so.0 (0xb4ebf000)
>   libidn.so.11 => /usr/lib/i386-linux-gnu/libidn.so.11 (0xb4e8b000)
>   

Re: Linking frameworks does not work

2018-05-02 Thread Wolfgang Lux


> Am 02.05.2018 um 12:42 schrieb Andreas Höschler :
> 
> Hi all,
> 
> I have Window Maker running now and Fred resize.app but still wasn't able to 
> get one of my own apps to work that need to be linked against my frameworks. 
> The test app links against gui and base but not any of the listed frameworks 
> SRFoundation, SREnterprise,...

That very much sounds like the code of your test app does not use any code from 
these frameworks.
Keep in mind that libraries linked with -l options are used only to resolve 
unresolved symbols in the code. If a library does not provide any such symbols 
it is ignored and will not be included in the final executable.

Wolfgang


___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Linking frameworks does not work

2018-05-02 Thread Andreas Höschler
Hi all,

I have Window Maker running now and Fred resize.app but still wasn't able to 
get one of my own apps to work that need to be linked against my frameworks. 
The test app links against gui and base but not any of the listed frameworks 
SRFoundation, SREnterprise,...

make messages=yes

gives me

...

gcc  -rdynamic  -pthread  -fgnu-runtime -o 
/Build/TabTest/TabTest.app/./TabTest \
/Build/TabTest/obj/TabTest.obj/Controller.m.o 
/Build/TabTest/obj/TabTest.obj/DocumentController.m.o 
/Build/TabTest/obj/TabTest.obj/main.m.o   -L/root/GNUstep/Library/Libraries 
-L/usr/local/lib   -lESMFoundation -lSRAppKit -lSRDesign -lSREnterprise 
-lSRFoundation -lSRInterface -lSRMapKit -lSRObjects -lSRQuery  -lgnustep-gui
-lgnustep-base-lobjc   -lm
...

but ldd shows none of the frameworks SRFoundation, SREnterprise,... in its 
output:

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

linux-gate.so.1 =>  (0xb7fb9000)
libgnustep-gui.so.0.26 => /usr/local/lib/libgnustep-gui.so.0.26 
(0xb7a3d000)
libgnustep-base.so.1.25 => /usr/local/lib/libgnustep-base.so.1.25 
(0xb74b8000)
libobjc.so.4 => /usr/lib/i386-linux-gnu/libobjc.so.4 (0xb7483000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7466000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb72af000)
libicuuc.so.55 => /usr/lib/i386-linux-gnu/libicuuc.so.55 (0xb7119000)
libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb70ee000)
libtiff.so.5 => /usr/lib/i386-linux-gnu/libtiff.so.5 (0xb7072000)
libjpeg.so.8 => /usr/lib/i386-linux-gnu/libjpeg.so.8 (0xb7013000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb6fbd000)
libgnutls.so.30 => /usr/lib/i386-linux-gnu/libgnutls.so.30 (0xb6e65000)
libxslt.so.1 => /usr/lib/i386-linux-gnu/libxslt.so.1 (0xb6e2)
libxml2.so.2 => /usr/lib/i386-linux-gnu/libxml2.so.2 (0xb6c3f000)
libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb6c36000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb6c3)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb6c15000)
libicui18n.so.55 => /usr/lib/i386-linux-gnu/libicui18n.so.55 
(0xb69a2000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6985000)
/lib/ld-linux.so.2 (0xb7fbb000)
libicudata.so.55 => /usr/lib/i386-linux-gnu/libicudata.so.55 
(0xb50cd000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb4f55000)
liblzma.so.5 => /lib/i386-linux-gnu/liblzma.so.5 (0xb4f2f000)
libjbig.so.0 => /usr/lib/i386-linux-gnu/libjbig.so.0 (0xb4f2)
libp11-kit.so.0 => /usr/lib/i386-linux-gnu/libp11-kit.so.0 (0xb4ebf000)
libidn.so.11 => /usr/lib/i386-linux-gnu/libidn.so.11 (0xb4e8b000)
libtasn1.so.6 => /usr/lib/i386-linux-gnu/libtasn1.so.6 (0xb4e75000)
libnettle.so.6 => /usr/lib/i386-linux-gnu/libnettle.so.6 (0xb4e38000)
libhogweed.so.4 => /usr/lib/i386-linux-gnu/libhogweed.so.4 (0xb4e03000)
libgmp.so.10 => /usr/lib/i386-linux-gnu/libgmp.so.10 (0xb4d77000)

I can't see why this would be so. Shouldn't the resulting binary be linked to 
my frameworks and this showing up in the ldd output? My frameworks are in the 
standard path.

find /usr/local -name SREnterprise

/usr/local/include/SREnterprise
/usr/local/lib/GNUstep/Frameworks/SREnterprise.framework/Versions/1/SREnterprise
/usr/local/lib/GNUstep/Frameworks/SREnterprise.framework/SREnterprise

I encounter this with gnustep-make-2.7.0.

Hints greatly appreciated!!

Thanks a lot in advance,

 Andreas





GNUmakefile:
===
include $(GNUSTEP_MAKEFILES)/common.make

APP_NAME = TabTest
PACKAGE_NAME = TabTest
TabTest_APPLICATION_ICON = TabTest.tiff


GNUSTEP_BUILD_DIR = /Build/TabTest
TabTest_APPLICATION_ICON = TabTest.icns

  GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
  ADDITIONAL_INCLUDE_DIRS +=
  ADDITIONAL_LIB_DIRS +=
  TabTest_GUI_LIBS += -lESMFoundation -lSRAppKit -lSRDesign -lSREnterprise 
-lSRFoundation -lSRInterface -lSRMapKit -lSRObjects -lSRQuery


TabTest_OBJC_FILES = Controller.m DocumentController.m main.m
TabTest_RESOURCE_FILES = MainMenu-GNUstep.gsmarkup MainMenu-OSX.gsmarkup 
SmartClient.tiff Document.smib TabTest.tiff Info-gnustep.plist
TabTest_LOCALIZED_RESOURCE_FILES =
TabTest_LANGUAGES =


include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/application.make
include GNUmakefile.postamble


___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Bugs in gui/back

2018-05-02 Thread Andreas Höschler
Hi Fred and all,

> Here comes my tiny test application. It is about the minimal code that
> is needed to test this behaviour. A minimal GNUmakefile for this would
> look something like this:

After successfully setting up Ubuntu 16 with Window Maker I was able to recheck 
your test app. It behaves correctly under Window Maker:

openapp ./resize.app &> A.out.

2018-05-02 12:05:04.413 resize[3378:3378] styleoffsets ... guessing offsets
2018-05-02 12:05:04.414 resize[3378:3378] styleoffsets ... guessing offsets
2018-05-02 12:05:04.529 resize[3378:3378] Content view set frame to {x = 1; y = 
9; width = 140; height = 140}

Now resizing the window ...

2018-05-02 12:05:08.426 resize[3378:3378] Content view set frame to {x = 1; y = 
9; width = 149; height = 140}
2018-05-02 12:05:08.426 resize[3378:3378] Content view set frame to {x = 1; y = 
9; width = 149; height = 140}

Looks good!

So the issue is somehow related to this Ubuntu ubity stuff. No problem for me 
as we want to and can run Window Maker anyway.

Thanks a lot,

 Andreas

___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Bugs in gui/back

2018-05-02 Thread Andreas Höschler
Hi all,

it seems my encountered problems were due to choosing the wrong ubuntu image 
(AMD instead of i386). I just tried it one again with Ubuntu 16.04 (i386 ISO) 
and am now after doing

apt-get install ntp
apt-get install openssh-server
apt-get install build-essential
apt-get install wmaker

 logged in into a WIndow Maker session. I can not continue to check out the 
gui/back issue now ...

Thanks a lot (so far),

 Andreas



___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Windows Project center not working

2018-05-02 Thread Andreas Fink
Hello all,

Today I tried to download gnustep for windows to see if it makes sense to port 
my MacOS / Gnustep Linux app to Windows as well.
However I failed at ProjectCenter which simply throws a Windows C++ runtime 
library error without saying much.

This is on a Windows 10 installation with no other developer tools installed 
(not sure if the referenced runtime is even installed)


Is this a version mismatch? Anyone have a hint what to look for?


Andreas

___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Re: Bugs in gui/back

2018-05-02 Thread Andreas Höschler
Hi Liam,

thanks for all your responses and tips:

> If you are running a beta of 18.04, the forthcoming LTS version, then
> again, it's GNOME 3 and Clutter under Wayland.


I - in the meanwhile - installed the newest version of VirtualBox on a Mac and 
into that as a guest OS the newest version of Ubuntu 18.04 TLS. I could do

apt install wmaker

but am not offerered window maker as an option on the login page!? :-(

They again changed everything. /etc/network/interfaces no longer works. They 
have invented just another theme to configure network interfaces.

pico /etc/netplan/01-network-manager-all.yaml

"networkd" does not work for me

network:
  version: 2
  renderer: networkd
 ethernets:
   enp0s3:
 dhcp4: no
 dhcp6: no
 addresses: [192.168.2.198/24]
 gateway4: 192.168.2.1
 nameservers:
   addresses: [8.8.8.8,8.8.4.4]


root@RetinaUbuntu18:~# netplan apply
Invalid YAML at //etc/netplan/01-network-manager-all.yaml line 4 column 1: did 
not find expected key

I also tried

network:
  version: 2
  renderer: NetworkManager

but wasn't able to start NetworkManager to setup a static network interface and 
dns-severs.

sudo NetworkManager

No error message but it happens nothing. If I simply say

NetworkManager

in a terminal session I get "You must be root to run NetworkManager". I tried 
to login as root into a gui session (root passwd is set and working) but not 
even that works "Sorry, that didn't work. Please try again".

In the meanwhile I spent days on getting Ububntu 16 ... 18 to work under 
VirtualBox (and possibly Window Maker) to test out the gui/back issue but am 
failing badly. :-( I will probably try my luck with other Linux distros now  ...

I am still looking for (or trying to assemble) a step by step tutorial to setup 
a GNUstep system from scratch on current hardware and current Linux releases. 
No luck at all. I am at zereo. This should be easier in 2018!? 

Best wishes,

 Andreas



___
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep