Closed Bug 316219 Opened 15 years ago Closed 15 years ago

freebl won't build on OS/2

Categories

(NSS :: Build, defect, P2, major)

3.11
x86
OS/2

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julien.pierre, Assigned: julien.pierre)

Details

Attachments

(1 file)

The following build error occurs in mozilla/security/nss/lib/freebl, which did not exist in the NSS_PERFORMANCE_HACKS_BRANCH :

gcc -o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/mp_gf2m.o -c  -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Zomf -DDEBUG -DTRACING -g -DXP_PC=1  -DXP_OS2=1 -DSHLIB_SUFFIX=\"DLL\" -DSHLIB_PREFIX=\"\" -DSHLIB_VERSION=\"3\" -DSOFTOKEN_SHLIB_VERSION=\"3\" -DRIJNDAEL_INCLUDE_TABLES -Uunix -U__unix -U__unix__ -DTCPV40HDRS -DDEBUG -D_DEBUG -DDEBUGPRINTS      -DXP_OS2 -DMP_API_COMPATIBLE -I../../../../dist/OS22.45_gcc_DBG.OBJ/include  -I../../../../dist/public/nss -I../../../../dist/private/nss -Impi -Iecl  E:/DEV/NSS/tip2/mozilla/security/nss/lib/freebl/mpi/mp_gf2m.c
echo LIBRARY freebl3 INITINSTANCE TERMINSTANCE > OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl.def; echo PROTMODE >> OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl.def; echo CODE    LOADONCALL MOVEABLE DISCARDABLE >> OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl.def; echo DATA    PRELOAD MOVEABLE MULTIPLE NONSHARED >> OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl.def; echo EXPORTS >> OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl.def; grep -v ';+' freebl.def | grep -v ';-' | sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,\([\t ]*\),\1_,' | awk 'BEGIN {ord=1;} { print($0 " @" ord " RESIDENTNAME"); ord++;}' >> OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl.def
rm -f OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl3.DLL
g++  -Zomf -Zdll -Zmap -o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl3.DLL OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl.def -o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl3.DLL OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freeblver.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/ldvector.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/prng_fips1861.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/sysrand.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/sha_fast.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/md2.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/md5.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/sha512.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/alghmac.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/rawhash.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/alg2268.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/arcfour.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/arcfive.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/desblapi.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/des.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/rijndael.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/aeskeywrap.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/dh.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/ec.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/pqg.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/dsa.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/rsa.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/shvfy.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/tlsprfalg.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/mpprime.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/mpmontg.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/mplogic.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/mpi.o OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/mp_gf2m.o   ../../../../dist/OS22.45_gcc_DBG.OBJ/lib/secutil.lib -L../../../../dist/OS22.45_gcc_DBG.OBJ/lib -lplc4 -lplds4 -lnspr4  
chmod +x OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl3.DLL
nsinstall              -R -m 775 OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl3.DLL ../../../../dist/OS22.45_gcc_DBG.OBJ/lib
nsinstall              -R -m 775 OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl3.lib ../../../../dist/OS22.45_gcc_DBG.OBJ/lib
nsinstall: cannot access OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB/freebl3.lib: No such file or directory
make.exe[1]: *** [libs] Error 1
make.exe[1]: Leaving directory `E:/DEV/NSS/tip2/mozilla/security/nss/lib/freebl'
gmake.exe: *** [libs] Error 2

There is no lib file under OS22.45_gcc_DBG.OBJ/OS2_SINGLE_SHLIB, only a freebl3.dll, freebl.def, freebl3.map, and the .o files . I don't believe a LIB file (import library) for this shared library is needed, since it is always loaded on-demand by loader.c .

There is a freebl.lib in OS22.45_gcc_DBG.OBJ which contains the loader and is used by softoken, ssl and the tools that still link NSS statically.
Move IMPORT_LIBRARY= statement out of Windows-specific block to general case of config.mk . Import libraries are only used on OS/2 and Windows, and we don't want one in either case.
Assignee: wtchang → julien.pierre.bugs
Status: NEW → ASSIGNED
Attachment #202872 - Flags: review?(wtchang)
Priority: -- → P2
Comment on attachment 202872 [details] [diff] [review]
don't build an import library on OS/2

> else
> # This is a recursive child make. We build the shared lib.
> 
> TARGETS      = $(SHARED_LIBRARY)
> LIBRARY      =
> PROGRAM      =
> 
> EXTRA_LIBS   += $(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX)
> 
>+# don't build an import library for OS/2 or Windows, since freebl gets
>+# loaded on-demand
>+IMPORT_LIBRARY =

The "IMPORT_LIBRARY =" statement should be right below
the "LIBRARY =" statement.  The comment can be omitted.
Attachment #202872 - Flags: review?(wtchang) → review+
Thanks for the review, Wan-Teh.
I checked this is in to the tip. Marking fixed.

/cvsroot/mozilla/security/nss/lib/freebl/config.mk,v  <--  config.mk
new revision: 1.15; previous revision: 1.14
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.