Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SWK - problem building the framework

6 views
Skip to first unread message

Riccardo Mottola

unread,
Aug 27, 2012, 5:26:06 AM8/27/12
to discuss...@gnu.org
Hi,

I have troubles building SWK gnustep after its latest changes. I get:

Compiling file DOMCSS.m ...
In file included from DOMCSS.m:31:
./DOMHTML.h:41:1: error: duplicate interface definition for class
'DOMHTMLCollection'
@interface DOMHTMLCollection : WebScriptObject
^
./derived_src/WebKit/DOMHTML.h:41:12: note: previous definition is here
@interface DOMHTMLCollection : WebScriptObject
^

It is giving me an error on the same file essentially! I wonder if this
is a makefile problem?

DOMCSS.m imports DOMHTML.h this way:

#import <WebKit/WebView.h>
#import "Private.h"
#import "DOMHTML.h"


I see nothing wrong with that.

Checking how other Frameworks are done, I noticed slight difference
between the SWK makefile and other makefiles. SWK uses "FRAMEWORK_NAME"
and includes framework.make.

Performance and WebServices use LIBRARY and library.make, I thought they
were framworks.

Hints?

Dr. H. Nikolaus Schaller

unread,
Aug 28, 2012, 3:34:05 AM8/28/12
to discuss-gnustep GNUstep
Hi,
could we please discuss such topics because it
is a multi-platform project?

I just found a patch committed to the repository instead.

I could argue that GNUstep make is broken, because it does
not understand #import "DOMHTML.h" as being the same.

Note the source did compile fine on mySTEP and MacOS X.
Both appear to cope better with the unmodified source.

But nevertheless the fix for GNUstep is not harmful to
compilation on the other platforms so it is ok.

BR,
Nikolaus
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss...@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep


Riccardo Mottola

unread,
Aug 28, 2012, 4:18:49 AM8/28/12
to Dr. H. Nikolaus Schaller, discuss-gnustep GNUstep
Hi Nikolaus,

Dr. H. Nikolaus Schaller wrote:
> Hi,
> could we please discuss such topics because it
> is a multi-platform project?
>
> I just found a patch committed to the repository instead.
>
> I could argue that GNUstep make is broken, because it does
> not understand #import "DOMHTML.h" as being the same.
>
> Note the source did compile fine on mySTEP and MacOS X.
> Both appear to cope better with the unmodified source.
>
> But nevertheless the fix for GNUstep is not harmful to
> compilation on the other platforms so it is ok.
>
Indeed, I was able to compile on Mac 10.4 without problems. Also Gregory
tested it with his buildtool and it works.

Apparently, GNUstep make (at lest in the way i wrote the makefile) has a
problem when importing locally ("") a header file that will be later
exported in the framework since it duplicates it in a separate
derived_src directory where, being it a separate file #import will
reimport it.

Is this indeed a problem with GNUstep make and not just a missing option
or wrong way in writing the makefile?

Apparently, using <> to import only for exported headers works, but is
it correct? and does it work with other build system / platforms? It
would be a limitation of gnustep, but at least we have a best practice
for portable code. That is Greg's patch.

I hope Nicola or Richard or other experts can shed some light in here.

Riccardo



Riccardo Mottola

unread,
Aug 28, 2012, 4:48:23 AM8/28/12
to discuss...@gnu.org
Hi,

even with Greg's workaround, I can't build/install the SWK framework
correctly. I get this warning message from Make:

clang: warning: argument unused during compilation: '-shared-libgcc'
Copying resources into the framework wrapper...
Creating SimpleWebKit.framework/Versions/0/Resources/Info-gnustep.plist...
Making all for framework SimpleWebKit...
Creating derived_src/NSFramework_SimpleWebKit.m...
Compiling file derived_src/NSFramework_SimpleWebKit.m ...
Warning! No files to link. Please check your GNUmakefile! Make sure
you set SimpleWebKit_OBJC_FILES (or similar variables)
Linking framework SimpleWebKit ...
clang: warning: argument unused during compilation: '-shared-libgcc'
Creating
SimpleWebKit.framework/Versions/0.1/Resources/Info-gnustep.plist...
Making install in Sources ...

but SimpleWebKit_OBJC_FILES is defined in the Subproject and always has
been.
When installing, I end with no installed headers. The WebKit directory
gets created, but no header.

Where is the problem? A problem with the organization of subprojects?
But it walays worked and the recent makefile changes should be only
minor (added package information, etc)

Thanks,
Riccardo

Wolfgang Lux

unread,
Aug 28, 2012, 5:59:03 AM8/28/12
to Riccardo Mottola, discuss...@gnu.org
Riccardo Mottola wrote:

> Where is the problem? A problem with the organization of subprojects? But it walays worked and the recent makefile changes should be only minor (added package information, etc)

The problem were your changes to the GNUmakefiles. You moved the definition of a few variables from Source/GNUmakefile to GNUmakefile and that list included SimpleWebKit_INTERFACE_VERSION. That variable, however, describes a property of the framework and not of the project as a whole. I have reverted this change and now everything should build fine again.

Wolfgang

PS I have also removed the include of $(GNUSTEP_MAKEFILES)/framework.make you added to the top-level directory. This include was pointless as the top-level directory does not build a framework; it is the Sources subdirectory which does.

Riccardo Mottola

unread,
Aug 28, 2012, 8:32:04 AM8/28/12
to Wolfgang Lux, discuss...@gnu.org
Hi,
Wolfgang Lux wrote:
> Riccardo Mottola wrote:
>
>> Where is the problem? A problem with the organization of subprojects? But it walays worked and the recent makefile changes should be only minor (added package information, etc)
> The problem were your changes to the GNUmakefiles. You moved the definition of a few variables from Source/GNUmakefile to GNUmakefile and that list included SimpleWebKit_INTERFACE_VERSION. That variable, however, describes a property of the framework and not of the project as a whole. I have reverted this change and now everything should build fine again.
Thanks for spotting that, the subproject is thus self-contained.
Thanks for explaining that, the make manual page doesn't report a
framework example, especially with a subproject.
>
> Wolfgang
>
> PS I have also removed the include of $(GNUSTEP_MAKEFILES)/framework.make you added to the top-level directory. This include was pointless as the top-level directory does not build a framework; it is the Sources subdirectory which does.
That's fine then. I did not understand well the role of the aggregate
project. I added some package information and new resource files and
during the cleanup I broke what I did months ago.

Riccardo

0 new messages