discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep on OpenBSD..


From: Sebastian Reitenbach
Subject: Re: GNUstep on OpenBSD..
Date: Tue, 14 Dec 2010 20:11:07 +0100
User-agent: Thunderbird 2.0.0.22 (X11/20090701)

Hi,

Nicola Pero wrote:
>> take a look at attached port. The gnumake package Makefiles are a bit hacked 
>> up to match the constraints/requirements of the ports framework, i.e. 
>> libraries need to have libPreferencesPane.so.MAJOR.MINOR, and not the 
>> Linuxish 
>> symlink clutter around.
>>     
>
> Is that how things should always be done in OpenBSD ?  If so, can you just 
> contribute
> me the patch you're using and we'll apply it to gnustep-make trunk ? :-)
>
>
>   
>> However, with the port I have the following problem:
>> when I start SystemPreferences, then I see on the console the following 
>> error:
>> Error (objc-load): File not found
>> and short after that, a error message window shows up, stating the following:
>>
>> Bad pane bundle at: /usr/local/lib/GNUstep/Bundles/Defaults.prefPane!
>>
>> But I have those files at the location:
>> $ ls -l /usr/local/lib/GNUstep/Bundles/Defaults.prefPane
>> total 208
>> -rwxr-xr-x  1 root  bin    102302 Dec 14 08:32 Defaults.so
>>     
>
> Is it correct to have the '.so' at the end of the bundle name ?
>   
I figured out where the cause of the problem comes from:
In GNUstep make, we have the following patch to Instance/bundle.make:
--- Instance/bundle.make.orig   Thu Mar 19 17:59:53 2009
+++ Instance/bundle.make        Tue Oct  6 20:36:23 2009
@@ -89,6 +89,8 @@ endif
 
 ifeq ($(BUILD_DLL),yes)
   BUNDLE_OBJ_EXT = $(DLL_LIBEXT)
+else
+BUNDLE_OBJ_EXT = $(SHARED_LIBEXT)
 endif
 
 endif # OBJ_FILES_TO_LINK

I don't know the intention of the patch, since its not for me, but I
guess that the prior MAINTAINER of the GNUstep ports must have thought
that the bundle files are not shared objects, but are shared objects,
and therefore added the .so file extension.


When I take a look now, what it is doing, when compiling the bundles I see:
Making all for bundle Defaults...
cd .; \
        /usr/local/share/GNUstep/Makefiles/mkinstalldirs ./obj/Defaults.obj/
/usr/local/share/GNUstep/Makefiles/mkinstalldirs Defaults.prefPane/.
cc Defaults.m -c \
              -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1
-DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1
-D_REENTRANT -fPIC -DDEBUG -fno-omit-frame-po
inter -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -O2 -pipe -g
-fno-strict-aliasing -Wall -fgnu-runtime -Wall
-fconstant-string-class=NSConstantString -I../../Preferenc
ePanes -I. -I/usr/local/include
-I/systempreferences-1.1.0_writes_to_HOME/GNUstep/Library/Headers
-I/usr/local/include \
               -o obj/Defaults.obj/Defaults.m.o
cc -shared -fPIC  -Wl,-E       -o ./Defaults.prefPane/./Defaults.so
./obj/Defaults.obj/Defaults.m.o    
-L../../PreferencePanes/PreferencePanes.framework/Versions/C
urrent/. 
-L/systempreferences-1.1.0_writes_to_HOME/GNUstep/Library/Libraries
-L/usr/local/lib  -L/usr/local/lib  -lPreferencePanes   -lgnustep-gui   
-lgnustep-bas
e   -pthread -lobjc   -lm
/usr/local/share/GNUstep/Makefiles/mkinstalldirs Defaults.prefPane/Resources
for f in Defaults.tiff Resources/English.lproj; do \
          if [ -f $f -o -d $f ]; then \
            cp -fr $f ./Defaults.prefPane/Resources/; \
          else \
            echo "Warning: $f not found - ignoring"; \
          fi; \
        done
echo "OLD_GNUSTEP_STAMP_ASTRING = _Defaults-" >
./Defaults.prefPane/stamp.make
(echo "{"; echo '  NOTE = "Automatically generated, do not edit!";'; \
          echo "  NSExecutable = \"Defaults.so\";"; \
          echo "  NSMainNibFile = \"\";"; \
          echo "  NSPrincipalClass = \"Defaults\";"; \
          echo "}") >Defaults.prefPane/Resources/Info-gnustep.plist
if [ -r "DefaultsInfo.plist" ]; then \
          plmerge Defaults.prefPane/Resources/Info-gnustep.plist
DefaultsInfo.plist; \
        fi
gmake[2]: Leaving directory
`/home/ports/pobj/systempreferences-1.1.0/SystemPreferences-1.1.0/Modules/Defaults'



It is creating the Defaults.so file, and is creating the
DefaultsInfo.plist file, including the correct echo "  NSExecutable =
\"Defaults.so\";"; line.
But in the source directory, there is a DefaultsInfo.plist file,
containing: NSExecutable = Defaults; and because this file is found, it
runs plmerge, and the resulting DefaultsInfo.plist file doesn't contain
the .so extension.

The bundles of gnustep-gui for example work fine, with the .so
extension, because there does no BUNDLE_NAMEInfo.plist exist.

Now I could go and ask the old maintainer about the intention of the
patch, and if he is fine with it, to actually remove it. On the other
side I wonder, whether SystemPreferences would work on Windows, because
BUNDLE_OBJ_EXT is set to .dll. I guess, plmerge on Windows would also
cause the same problem like I have seen here.
Otherwise, it probably would be save to remove all the "NSExecutable ="
lines from the *Info.plist files that come with SystemPreferences, since
the "NSExecutable =" line is created correctly when running make, and
then the rest of it is merged.

For me actually, the patch to bundle.make to append the .so extension
makes kind of sense, but there may be other reasons why an extension is
omitted. If someone could enlighten me here, I'd appreciate it.


Anyways, Krishna, attached an updated systempreferences port, that works
for me now.

cheers,
Sebastian

Attachment: systempreferences.tar.gz
Description: application/gzip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]