Forum OpenACS Q&A: Response to nsopenssl build problem

Collapse
Posted by Eric Lee on

Andrew's Sept. 17 suggestion did the trick. I modified the SunOS/ Solaris branch of aolserver/include/Makefile.global as shown in bold below. I'd still like to know what this actually does.

ifneq (,$(findstring SunOS,$(PLAT)))
    PLATFORM=solaris

    ifdef nativeme
        # This nativeme branch fails on badger:
        #  /usr/ucb/cc:  language optional software package not installed
        CC=$(PURIFY) /usr/ucb/cc
        # no /opt/SUNWspro/bin/cc on badger
        #CC=$(PURIFY) /opt/SUNWspro/bin/cc
        #CCOPTIMIZE = -x02
        CCOPTIMIZE = -g
        CFLAGS+=$(CCOPTIMIZE) -KPIC -erroff=%none
        LD=/usr/ccs/bin/ld
        # Piskorski version:
        #LD=/usr/ccs/bin/ld -L/etc/lib -ldl
        LDSO=$(LD) -G
        ifneq (,$(findstring sparc,$(PLAT)))
            CFLAGS+=-xarch=v8plusa
        else
            CFLAGS+=-xpentium
        endif
    else
        ifneq (,$(findstring sparc,$(PLAT)))
            CFLAGS+=$(GCCOPT) -mcpu=ultrasparc
        else
            # This is the branch actually taken.
            CFLAGS+=$(GCCOPT) -mcpu=pentium
            #
            # 19Sep02 EL Per A.Piskorski.
            LD=/usr/ccs/bin/ld -L/etc/lib -ldl
            LDSO=$(LD) -G
        endif
    endif


    NSDLIBS=-lm
    LIBS+=-lsocket -lnsl -ldl -lposix4 -lthread -lresolv -R $(RPATH)
    AR=/usr/ccs/bin/ar
    CFLAGS+=-D_POSIX_PTHREAD_SEMANTICS=1 -DUSE_PTHREAD_SYSSCOPE=1 
            -DUSE_PTHREAD_PSHARED=1 -DHAVE_ETIME_BUG=1 
            -DUSE_DUPHIGH=1 -DHAVE_FORK1=1
endif

To respond to Drazen Kacar's suggestion, Makefile.global is set up to use -fPIC by default, although this was not indicated in the output from gcc

GCCOPT       =   $(GCCOPTIMIZE) -fPIC -Wall -Wno-unused

Another user suggested the problem might be using Sun's ld instead of GNU's (gld), but the the successful build was eventually done with Sun's ld, which had been used all along

Thanks very much to all to took the time to help.

Eric Lee