Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Stock build system: Cygwin and dynamic libraries
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vladimir Panov  
View profile  
 More options Feb 15 2006, 4:24 pm
Newsgroups: comp.soft-sys.ace
From: Vladimir Panov <g...@voidland.org>
Date: 15 Feb 2006 15:24:33 -0600
Local: Wed, Feb 15 2006 4:24 pm
Subject: [ace-bugs] Stock build system: Cygwin and dynamic libraries

ACE VERSION: 5.4.9

HOST MACHINE and OPERATING SYSTEM:
x86, Cygwin, Microsoft Windows

TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
Not different.

COMPILER NAME AND VERSION (AND PATCHLEVEL):
GCC 3.4.4

THE $ACE_ROOT/ace/config.h FILE:
config-cygwin32.h

THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
platform_cygwin32.GNU

CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features:
Does not exist.

AREA/CLASS/EXAMPLE AFFECTED:
Building programs agains ACE (and TAO) is affected.

DOES THE PROBLEM AFFECT:
COMPILATION? No
LINKING? No
EXECUTION? No
OTHER (please specify)?
Linking programs against ACE (and TAO) is affected.

SYNOPSIS:
ACE stock build system doesn't take into account the "import libraries" feature of Microsoft Windows.

DESCRIPTION:
Under Windows (Cygwin included) a dynamic library consists of two files:
name.DLL - the dynamic library itself (used only on runtime)
name.A (or name.LIB outside of Cygwin) - an import library (used only during linking)

The import libraries are needed when linking, so they should be in the lib directory. The DLL files must be in a directory which is included in $PATH,
so it makes sense to put them in the bin directory.
But the stock build system puts the DLL files in the lib directory, and does nothing about the import libraries (it just leaves them scattered
throughout the build tree).

REPEAT BY:
Build ACE under Cygwin. Try to link and run a program against it non-statically.

SAMPLE FIX/WORKAROUND:
I have attached a patch. It doesn't look very nice, but works for me.

Disclaimer: I am not a Windows programmer, so if I have written some big nonsense above - please, excuse me.

[ cygwin.patch 1K ]
diff -r -u -N ACE-5.4.9+TAO-1.4.9-orig/include/makeinclude/rules.local.GNU ACE-5.4.9+TAO-1.4.9/include/makeinclude/rules.local.GNU
--- ACE-5.4.9+TAO-1.4.9-orig/include/makeinclude/rules.local.GNU        2006-01-11 15:15:21.000000000 +0200
+++ ACE-5.4.9+TAO-1.4.9/include/makeinclude/rules.local.GNU     2006-02-12 01:56:33.000000000 +0200
@@ -266,6 +266,30 @@
                $(RM) $@ && \
                $(LN_S) $(shell pwd)/$(@F) $@
 else
+ifeq ($(cygwin32),1)
+       @if test $(shell pwd) != $(@D) -o -n "$(SOVERSION)" ; then \
+               if echo "$(@F)" | grep "\.[dD][lL][lL]$$" > /dev/null ; then \
+                       if test -s $(@:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)).a  &&  test -s $(@D)/../bin/$(@F:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)) ; then \
+                               echo "$(@F) already installed" ; \
+                       else \
+                               echo "Installing $(@F:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)).a -> $(@D)" ; \
+                               $(RM) $(@:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)).a; \
+                               $(LN_S) $(shell pwd)/$(@F).a $(@:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)).a; \
+                               echo "Installing $(@F:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)) -> $(@D)/../bin" ; \
+                               $(RM) $(@D)/../bin/$(@F:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)); \
+                               $(LN_S) $(shell pwd)/$(@F) $(@D)/../bin/$(@F:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)); \
+                       fi ; \
+        else \
+                       if test -s $@ ; then \
+                               echo "$(@F) already installed" ; \
+                       else \
+                               echo "Installing $(@F:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)) -> $(@D)" ; \
+                               $(RM) $(@:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)); \
+                               $(LN_S) $(shell pwd)/$(@F) $(@:%.$(SOEXT)$(SOVERSION)=%.$(SOEXT)); \
+                       fi ; \
+               fi ; \
+       fi
+else
 ifneq ($(mingw32),1)
        @if test $(shell pwd) != $(@D) -o -n "$(SOVERSION)" ; then \
                if test -s $@ ; then \
@@ -294,6 +318,7 @@
        fi
 endif
 endif
+endif
 ifdef MVSLIB
 #special for MVS in order to use the .x files
        @if test -w $(@D) ; then \


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google