Overview
Features
Download
Documentation
Community
Add-Ons & Services

Compile Issues building Solaris (config=SunOS-SunStudio)

General discussion regarding the development of POCO for contributors.

Compile Issues building Solaris (config=SunOS-SunStudio)

Postby markt » 19 Aug 2009, 02:15

When trying to compile static libraries, I found a couple issues. Here are the patches:

This occurs on these Configs:
SunOS-stdcxx-x86_64
SunOS-SunForte
SunOS-SunStudio

Change 1:
Need to remove $@ on LIB command because when running $(LIB), the $@ is already specified in build/rules/lib.
Code: Select all
% diff orig/poco-1.3.5/build/config/SunOS-SunStudio poco-1.3.5/build/config/SunOS-SunStudio
--- orig/poco-1.3.5/build/config/SunOS-SunStudio        Tue May 12 11:05:53 2009
+++ poco-1.3.5/build/config/SunOS-SunStudio     Tue Aug 18 12:46:18 2009
@@ -17,7 +17,7 @@
 CC      = cc
 CXX     = CC
 LINK    = $(CXX)
-LIB     = $(CXX) -xar -o $@
+LIB     = $(CXX) -xar -o
 RANLIB  = ranlib
 SHLIB   = $(CXX) $(LINKFLAGS) -G -o $@ -h$(notdir $@)
 SHLIBLN = $(POCO_BASE)/build/script/shlibln



Change 2:
When compiling static libraries, we set $(STATICOPT_LINK) (-Bstatic), but we don't reset it to $(SHAREDOPT_LINK) (-Bdynamic) before calling system libraries (-lsocket -lrt, etc...). This causes a link break because it's looking for static system libraries.
Code: Select all
% diff orig/poco-1.3.5/build/rules/exec poco-1.3.5/build/rules/exec
--- orig/poco-1.3.5/build/rules/exec    Tue May 12 11:05:53 2009
+++ poco-1.3.5/build/rules/exec Tue Aug 18 16:12:29 2009
@@ -41,7 +41,7 @@

 $(EXEC_DEBUG_STATIC): $(foreach o,$(objects),$(OBJPATH_DEBUG_STATIC)/$(o).o)
        @echo "** Building executable (debug)" $@
-       $(LINK) $(LINKFLAGS) $(DEBUGOPT_LINK) $(STATICOPT_LINK) -o $@ $^ $(LIBRARY) $(TARGET_LIBS_DEBUG) $(SYSLIBS)
+       $(LINK) $(LINKFLAGS) $(DEBUGOPT_LINK) $(STATICOPT_LINK) -o $@ $^ $(LIBRARY) $(TARGET_LIBS_DEBUG) $(SHAREDOPT_LINK) $(SYSLIBS)
        $(CPYDBG)
        $(STRIPDBGCMD)
        $(postbuild)
@@ -48,7 +48,7 @@

 $(EXEC_RELEASE_STATIC): $(foreach o,$(objects),$(OBJPATH_RELEASE_STATIC)/$(o).o)
        @echo "** Building executable (release)" $@
-       $(LINK) $(LINKFLAGS) $(RELEASEOPT_LINK) $(STATICOPT_LINK) -o $@ $^ $(LIBRARY) $(TARGET_LIBS_RELEASE) $(SYSLIBS)
+       $(LINK) $(LINKFLAGS) $(RELEASEOPT_LINK) $(STATICOPT_LINK) -o $@ $^ $(LIBRARY) $(TARGET_LIBS_RELEASE) $(SHAREDOPT_LINK) $(SYSLIBS)
        $(STRIPCMD)
        $(postbuild)
markt
 
Posts: 2
Joined: 19 Aug 2009, 02:02

Re: Compile Issues building Solaris (config=SunOS-SunStudio)

Postby alex » 19 Aug 2009, 11:48

Thanks for the report. I'll look into this. What compiler and POCO version are you using?

Also, can you please post patch on the Sourceforge?
alex
 
Posts: 1130
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Compile Issues building Solaris (config=SunOS-SunStudio)

Postby markt » 20 Aug 2009, 06:39

alex wrote:Thanks for the report. I'll look into this. What compiler and POCO version are you using?

Also, can you please post patch on the Sourceforge?


I posted the patch on SourceForge.

This is occurs on POCO 1.3.5
Compiler: SunStudio 12
markt
 
Posts: 2
Joined: 19 Aug 2009, 02:02

Re: Compile Issues building Solaris (config=SunOS-SunStudio)

Postby alex » 20 Aug 2009, 16:39

Fixed in 1.3.6, rev 1240
alex
 
Posts: 1130
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest