Hi,

I have tried your suggestions, but I still got undefined reference errors to functions defined in pk11pub.h. Even comm-release version 17 is also affected.

nss-config version: 3.13.1
OS: Ubuntu Linux 12.04 LTS
Compiler used: g++ 4.6.3
IDE: NetBeans 7.2

ldd result:
ldd /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/lib/libnss3.so
        linux-gate.so.1 =>  (0xb775e000)
        libnssutil3.so => /usr/lib/i386-linux-gnu/libnssutil3.so (0xb75fe000)
        libplc4.so => /usr/lib/i386-linux-gnu/libplc4.so (0xb75f8000)
        libplds4.so => /usr/lib/i386-linux-gnu/libplds4.so (0xb75f2000)
        libnspr4.so => /usr/lib/i386-linux-gnu/libnspr4.so (0xb75b4000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb740a000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb73ef000)
        libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb73ea000)
        /lib/ld-linux.so.2 (0xb775f000)

Makefile:
# Defines
SHELL = /bin/bash

# Collect info from environment
OS = $(shell uname -s)
MACH = $(shell uname -m)
PLATFORM = $(shell uname -p)

# Change this to point at Thunderbird source's directory.
THUNDERBIRD_SOURCE ?= $(HOME)/comm-release17.0

ifeq ($(OS), Linux)
  ifeq ($(MACH), i386)
    MODULE              = libotrmailcrypt-x86-gcc3
    # Change this to point at your Thunderbird compiled directory.
    THUNDERBIRD_OBJDIR_PATH ?= $(THUNDERBIRD_SOURCE)/obj-i686-pc-linux-gnu
  else ifeq ($(MACH), i686)
    MODULE              = libotrmailcrypt-x86-gcc3
    # Change this to point at your Thunderbird compiled directory.
    THUNDERBIRD_OBJDIR_PATH ?= $(THUNDERBIRD_SOURCE)/obj-i686-pc-linux-gnu
  else
    MODULE              = libotrmailcrypt-x86_64-gcc3
    # Change this to point at your Thunderbird compiled directory.
THUNDERBIRD_OBJDIR_PATH ?= $(THUNDERBIRD_SOURCE)/obj-x86_64-unknown-linux-gnu
  endif
endif

PYTHON_PATH    ?= $(THUNDERBIRD_SOURCE)/mozilla/config/pythonpath.py
EXPANDLIBS_GEN  ?= $(THUNDERBIRD_SOURCE)/mozilla/config/expandlibs_gen.py
EXPANDLIBS_EXEC ?= $(THUNDERBIRD_SOURCE)/mozilla/config/expandlibs_exec.py
XPIDL_HEADER   ?= $(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/sdk/bin/header.py
XPIDL_TYPELIB  ?= $(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/sdk/bin/typelib.py

VERSION_SCRIPT ?= $(THUNDERBIRD_SOURCE)/mozilla/build/unix/gnu-ld-scripts/components-version-script

PROJECTDIR      = $(HOME)/libotrmailcrypt-gcc3

PROJECTDIR_DEPS = $(HOME)/libotrmailcrypt-gcc3/.deps

IPC_PROJECTDIR  = $(HOME)/libipc-gcc3
OTRMIME_PROJECTDIR  = $(HOME)/libotrmime-gcc3

CXX            ?= c++

XPIDLSRCS       = \
                nsIOTRMailCrypt.idl         \
                nsIOTRMailKeyDB.idl         \
                $(NULL)

XPIDL_HEADERS   = \
                nsIOTRMailCrypt.h           \
                nsIOTRMailKeyDB.h           \
                $(NULL)

XPIDL_TYPELIBS  = \
                nsIOTRMailCrypt.xpt         \
                nsIOTRMailKeyDB.xpt         \
                $(NULL)

CPPSRCS         = \
                cryptoMain.cpp              \
                nsOTRMailCrypt.cpp          \
                nsOTRMailCryptModule.cpp    \
                $(NULL)

OTRMAILCRYPT_MODULE     = nsOTRMailCryptModule

CPPFLAGS +=     -fno-rtti               \
                -fno-exceptions         \
                -fshort-wchar           \
                -fPIC                   \
                $(NULL)

EXPANDLIBS_EXEC_OPTIONS += --uselist                            \
                           --  c++                              \
                           -Wl,-z,defs                          \
                           -Wl,--gc-sections                    \
                           -Wl,-rpath-link,/usr/local/lib       \
                           -Wl,--version-script                 \
                           -Wl,$(VERSION_SCRIPT)                \
                           -Wl,-Bsymbolic                       \
                           -ldl                                 \
                           -lm                                  \
                           $(NULL)

# GCC only define which allows us to not have to #include mozilla-config
# in every .cpp file.  If your not using GCC remove this line and add
# #include "mozilla-config.h" to each of your .cpp files.
# GECKO_CONFIG_INCLUDE = -include mozilla-config.h

THUNDERBIRD_DEFINES += -DMOZ_THUNDERBIRD=1              \
                       -DMOZILLA_MAJOR_VERSION=17       \
                       -DMOZILLA_MINOR_VERSION=0        \
                       -DMOZ_GLUE_IN_PROGRAM            \
                       -DMOZILLA_CLIENT                 \
                       $(NULL)

PYTHON_INCLUDES = -I$(THUNDERBIRD_SOURCE)/mozilla/other-licenses/ply        \
                  -I$(THUNDERBIRD_SOURCE)/mozilla/xpcom/idl-parser          \
                  -I$(THUNDERBIRD_SOURCE)/mozilla/xpcom/typelib/xpt/tools

IDL_INCLUDES = -I.                                              \
               -I$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/idl    \
               -I$(IPC_PROJECTDIR)                              \
               -I$(OTRMIME_PROJECTDIR)

THUNDERBIRD_FILE_INCLUDES = -include $(THUNDERBIRD_SOURCE)/mozilla/config/gcc_hidden.h \
                            -include $(THUNDERBIRD_OBJDIR_PATH)/comm-config.h   

EXPANDLIBS_INCLUDES = -I$(THUNDERBIRD_OBJDIR_PATH)/mozilla/config

THUNDERBIRD_INCLUDES = -I.                                                      
        \
                       -I$(THUNDERBIRD_OBJDIR_PATH)                             
        \
                       -I$(IPC_PROJECTDIR)                                      
        \
                       -I$(OTRMIME_PROJECTDIR)                                  
        \
                       -I$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/include        
        \

-I$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/stl_wrappers          \

-I$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/system_wrappers       \

-I$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/include/nsprpub       \

-I$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/include/nss

THUNDERBIRD_NSPR_CONFIG = `$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/sdk/bin/nspr-config \

--prefix=I$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist                       \

--includedir=$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/include/nspr       \
                        --cflags`

THUNDERBIRD_LIBNSPR_CONFIG = `$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/sdk/bin/nspr-config \

--prefix=I$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist                       \

--libdir=$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/lib                    \
                           --libs`

THUNDERBIRD_LDFLAGS =  -L$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/lib            
        \
                       -L$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/bin            
        \
                       -lxpcom                                                  
        \
                       
$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/lib/libxpcomglue_s.a     \
                       -lnspr4                                                  
        \
                       -lmozalloc                                               
        \
                       -lnss3                                                   
        \
                       -lnssutil3                                               
        \
                       -lplds4                                                  
        \
                       -lplc4                                                   
        \
                       -lxul                                                    
        \
                       -shared                                                  
        \
                       $(NULL)

%.h: %.idl
python -u $(PYTHON_PATH) $(PYTHON_INCLUDES) $(XPIDL_HEADER) --cachedir=$(PROJECTDIR) $(IDL_INCLUDES) $< -d $(PROJECTDIR_DEPS)/$@.pp -o $@

%.xpt: %.idl
python -u $(PYTHON_PATH) $(PYTHON_INCLUDES) $(XPIDL_TYPELIB) --cachedir=$(PROJECTDIR) $(IDL_INCLUDES) $< -d $(PROJECTDIR_DEPS)/$@.pp -o $@

%.o: %.cpp Makefile
$(CXX) -o $@ -c $(CPPFLAGS) $(CXXFLAGS) $(THUNDERBIRD_DEFINES) $(THUNDERBIRD_FILE_INCLUDES) $(THUNDERBIRD_INCLUDES) $(THUNDERBIRD_NSPR_CONFIG) $<

$(MODULE).so: $(XPIDLSRCS:%.idl=%.h) $(XPIDLSRCS:%.idl=%.xpt) $(CPPSRCS:%.cpp=%.o) python $(PYTHON_PATH) $(EXPANDLIBS_INCLUDES) $(EXPANDLIBS_GEN) --depend $(PROJECTDIR_DEPS)/$(MODULE)_s.a.pp -o $(MODULE)_s.a.desc $(CPPSRCS:%.cpp=%.o) $(CXX) -o $(OTRMAILCRYPT_MODULE).o -c $(CPPFLAGS) $(CXXFLAGS) $(THUNDERBIRD_DEFINES) $(THUNDERBIRD_FILE_INCLUDES) $(THUNDERBIRD_INCLUDES) $(THUNDERBIRD_NSPR_CONFIG) $(OTRMAILCRYPT_MODULE).cpp python $(PYTHON_PATH) $(EXPANDLIBS_INCLUDES) $(EXPANDLIBS_EXEC) --depend $(PROJECTDIR_DEPS)/$(MODULE).pp --target $(MODULE).so $(EXPANDLIBS_EXEC_OPTIONS) $(CPPFLAGS) -Wl,-h,$(MODULE).so -o $(MODULE).so $(OTRMAILCRYPT_MODULE).o $(MODULE)_s.a $(THUNDERBIRD_LDFLAGS) $(THUNDERBIRD_LIBNSPR_CONFIG)
        rm *.o
        rm $(MODULE)_s.a.desc   
        chmod +x $@

build: $(MODULE).so

clean:
        rm -f $(PROJECTDIR_DEPS)/*.desc
        rm -f $(PROJECTDIR_DEPS)/*.pp
        rm -f $(XPIDL_HEADERS)
        rm -f $(XPIDL_TYPELIBS)
        rm -f $(MODULE)_s.a
        rm -f $(MODULE).so

Error result:
python -u /home/cpe479/comm-release17.0/mozilla/config/pythonpath.py -I/home/cpe479/comm-release17.0/mozilla/other-licenses/ply -I/home/cpe479/comm-release17.0/mozilla/xpcom/idl-parser -I/home/cpe479/comm-release17.0/mozilla/xpcom/typelib/xpt/tools /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/sdk/bin/header.py --cachedir=/home/cpe479/libotrmailcrypt-gcc3 -I. -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/idl -I/home/cpe479/libipc-gcc3 -I/home/cpe479/libotrmime-gcc3 nsIOTRMailCrypt.idl -d /home/cpe479/libotrmailcrypt-gcc3/.deps/nsIOTRMailCrypt.h.pp -o nsIOTRMailCrypt.h python -u /home/cpe479/comm-release17.0/mozilla/config/pythonpath.py -I/home/cpe479/comm-release17.0/mozilla/other-licenses/ply -I/home/cpe479/comm-release17.0/mozilla/xpcom/idl-parser -I/home/cpe479/comm-release17.0/mozilla/xpcom/typelib/xpt/tools /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/sdk/bin/header.py --cachedir=/home/cpe479/libotrmailcrypt-gcc3 -I. -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/idl -I/home/cpe479/libipc-gcc3 -I/home/cpe479/libotrmime-gcc3 nsIOTRMailKeyDB.idl -d /home/cpe479/libotrmailcrypt-gcc3/.deps/nsIOTRMailKeyDB.h.pp -o nsIOTRMailKeyDB.h python -u /home/cpe479/comm-release17.0/mozilla/config/pythonpath.py -I/home/cpe479/comm-release17.0/mozilla/other-licenses/ply -I/home/cpe479/comm-release17.0/mozilla/xpcom/idl-parser -I/home/cpe479/comm-release17.0/mozilla/xpcom/typelib/xpt/tools /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/sdk/bin/typelib.py --cachedir=/home/cpe479/libotrmailcrypt-gcc3 -I. -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/idl -I/home/cpe479/libipc-gcc3 -I/home/cpe479/libotrmime-gcc3 nsIOTRMailCrypt.idl -d /home/cpe479/libotrmailcrypt-gcc3/.deps/nsIOTRMailCrypt.xpt.pp -o nsIOTRMailCrypt.xpt python -u /home/cpe479/comm-release17.0/mozilla/config/pythonpath.py -I/home/cpe479/comm-release17.0/mozilla/other-licenses/ply -I/home/cpe479/comm-release17.0/mozilla/xpcom/idl-parser -I/home/cpe479/comm-release17.0/mozilla/xpcom/typelib/xpt/tools /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/sdk/bin/typelib.py --cachedir=/home/cpe479/libotrmailcrypt-gcc3 -I. -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/idl -I/home/cpe479/libipc-gcc3 -I/home/cpe479/libotrmime-gcc3 nsIOTRMailKeyDB.idl -d /home/cpe479/libotrmailcrypt-gcc3/.deps/nsIOTRMailKeyDB.xpt.pp -o nsIOTRMailKeyDB.xpt g++ -o cryptoMain.o -c -fno-rtti -fno-exceptions -fshort-wchar -fPIC -DMOZ_THUNDERBIRD=1 -DMOZILLA_MAJOR_VERSION=17 -DMOZILLA_MINOR_VERSION=0 -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_CLIENT -include /home/cpe479/comm-release17.0/mozilla/config/gcc_hidden.h -include /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/comm-config.h -I. -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu -I/home/cpe479/libipc-gcc3 -I/home/cpe479/libotrmime-gcc3 -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/stl_wrappers -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/system_wrappers -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nsprpub -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nss `/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/sdk/bin/nspr-config --prefix=I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist --includedir=/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nspr --cflags` cryptoMain.cpp cryptoMain.cpp: In function ‘nsresult asciiArmor(const nsACString&, const nsACString&, nsACString&, uint32_t&)’: cryptoMain.cpp:364:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] cryptoMain.cpp:383:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] cryptoMain.cpp: In function ‘nsresult asciiUnArmor(const nsACString&, nsACString&, nsACString&, uint32_t&)’: cryptoMain.cpp:429:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] cryptoMain.cpp:435:47: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] g++ -o nsOTRMailCrypt.o -c -fno-rtti -fno-exceptions -fshort-wchar -fPIC -DMOZ_THUNDERBIRD=1 -DMOZILLA_MAJOR_VERSION=17 -DMOZILLA_MINOR_VERSION=0 -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_CLIENT -include /home/cpe479/comm-release17.0/mozilla/config/gcc_hidden.h -include /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/comm-config.h -I. -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu -I/home/cpe479/libipc-gcc3 -I/home/cpe479/libotrmime-gcc3 -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/stl_wrappers -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/system_wrappers -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nsprpub -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nss `/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/sdk/bin/nspr-config --prefix=I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist --includedir=/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nspr --cflags` nsOTRMailCrypt.cpp nsOTRMailCrypt.cpp: In member function ‘virtual nsresult nsOTRMailCrypt::GenerateSecretKey(const nsACString&, const nsACString&, nsACString&)’: nsOTRMailCrypt.cpp:443:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] g++ -o nsOTRMailCryptModule.o -c -fno-rtti -fno-exceptions -fshort-wchar -fPIC -DMOZ_THUNDERBIRD=1 -DMOZILLA_MAJOR_VERSION=17 -DMOZILLA_MINOR_VERSION=0 -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_CLIENT -include /home/cpe479/comm-release17.0/mozilla/config/gcc_hidden.h -include /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/comm-config.h -I. -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu -I/home/cpe479/libipc-gcc3 -I/home/cpe479/libotrmime-gcc3 -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/stl_wrappers -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/system_wrappers -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nsprpub -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nss `/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/sdk/bin/nspr-config --prefix=I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist --includedir=/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nspr --cflags` nsOTRMailCryptModule.cpp python /home/cpe479/comm-release17.0/mozilla/config/pythonpath.py -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/config /home/cpe479/comm-release17.0/mozilla/config/expandlibs_gen.py --depend /home/cpe479/libotrmailcrypt-gcc3/.deps/libotrmailcrypt-x86-gcc3_s.a.pp -o libotrmailcrypt-x86-gcc3_s.a.desc cryptoMain.o nsOTRMailCrypt.o nsOTRMailCryptModule.o g++ -o nsOTRMailCryptModule.o -c -fno-rtti -fno-exceptions -fshort-wchar -fPIC -DMOZ_THUNDERBIRD=1 -DMOZILLA_MAJOR_VERSION=17 -DMOZILLA_MINOR_VERSION=0 -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_CLIENT -include /home/cpe479/comm-release17.0/mozilla/config/gcc_hidden.h -include /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/comm-config.h -I. -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu -I/home/cpe479/libipc-gcc3 -I/home/cpe479/libotrmime-gcc3 -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/stl_wrappers -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/system_wrappers -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nsprpub -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nss `/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/sdk/bin/nspr-config --prefix=I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist --includedir=/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/include/nspr --cflags` nsOTRMailCryptModule.cpp python /home/cpe479/comm-release17.0/mozilla/config/pythonpath.py -I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/config /home/cpe479/comm-release17.0/mozilla/config/expandlibs_exec.py --depend /home/cpe479/libotrmailcrypt-gcc3/.deps/libotrmailcrypt-x86-gcc3.pp --target libotrmailcrypt-x86-gcc3.so --uselist -- c++ -Wl,-z,defs -Wl,--gc-sections -Wl,-rpath-link,/usr/local/lib -Wl,--version-script -Wl,/home/cpe479/comm-release17.0/mozilla/build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -ldl -lm -fno-rtti -fno-exceptions -fshort-wchar -fPIC -Wl,-h,libotrmailcrypt-x86-gcc3.so -o libotrmailcrypt-x86-gcc3.so nsOTRMailCryptModule.o libotrmailcrypt-x86-gcc3_s.a -L/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/lib -L/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/bin -lxpcom /home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/lib/libxpcomglue_s.a -lnspr4 -lmozalloc -lnss3 -lnssutil3 -lplds4 -lplc4 -lxul -shared `/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/sdk/bin/nspr-config --prefix=I/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist --libdir=/home/cpe479/comm-release17.0/obj-i686-pc-linux-gnu/mozilla/dist/lib --libs` nsOTRMailCryptModule.o:(.data.rel.ro.local+0x0): multiple definition of `NSModule'
nsOTRMailCryptModule.o:(.data.rel.ro.local+0x0): first defined here
cryptoMain.o: In function `deriveKey(nsACString const&, char const*, PK11SymKeyStr**)':
cryptoMain.cpp:(.text+0x2f9): undefined reference to `PK11_GetInternalSlot'
cryptoMain.cpp:(.text+0x325): undefined reference to `PK11_CreatePBEAlgorithmID'
cryptoMain.cpp:(.text+0x35e): undefined reference to `PK11_PBEKeyGen'
cryptoMain.cpp:(.text+0x376): undefined reference to `SECOID_DestroyAlgorithmID'
cryptoMain.cpp:(.text+0x387): undefined reference to `PK11_FreeSlot'
cryptoMain.o: In function `arc4Encrypt(PK11SymKeyStr*, nsACString const&, nsACString&)':
cryptoMain.cpp:(.text+0x416): undefined reference to `PK11_ParamFromIV'
cryptoMain.cpp:(.text+0x470): undefined reference to `PK11_CreateContextBySymKey'
cryptoMain.cpp:(.text+0x4ee): undefined reference to `PK11_CipherOp'
cryptoMain.cpp:(.text+0x54a): undefined reference to `PK11_DigestFinal'
cryptoMain.cpp:(.text+0x591): undefined reference to `PK11_Finalize'
cryptoMain.cpp:(.text+0x5cc): undefined reference to `PK11_DestroyContext'
cryptoMain.cpp:(.text+0x5e5): undefined reference to `SECITEM_FreeItem'
cryptoMain.o: In function `getDHParam(SECKEYDHParamsStr*)':
cryptoMain.cpp:(.text+0x62f): undefined reference to `PORT_NewArena'
cryptoMain.cpp:(.text+0x671): undefined reference to `SECITEM_AllocItem'
cryptoMain.cpp:(.text+0x741): undefined reference to `PORT_ArenaAlloc'
cryptoMain.o: In function `hexString2SECItem(PLArenaPool*, SECItemStr*, char const*)':
cryptoMain.cpp:(.text+0x847): undefined reference to `PORT_ArenaAlloc'
cryptoMain.o: In function `deletePrivateKey(char*)':
cryptoMain.cpp:(.text+0x984): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0x9a7): undefined reference to `PK11_ListPrivKeysInSlot'
cryptoMain.cpp:(.text+0x9c8): undefined reference to `SECKEY_CopyPrivateKey'
cryptoMain.cpp:(.text+0x9e4): undefined reference to `PK11_DeleteTokenPrivateKey' cryptoMain.cpp:(.text+0xa1c): undefined reference to `SECKEY_DestroyPrivateKeyList' cryptoMain.cpp:(.text+0xa2d): undefined reference to `SECKEY_DestroyPrivateKey'
cryptoMain.o: In function `deletePublicKey(char*)':
cryptoMain.cpp:(.text+0xa52): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0xa6d): undefined reference to `PK11_ListPublicKeysInSlot'
cryptoMain.cpp:(.text+0xa8e): undefined reference to `SECKEY_CopyPublicKey'
cryptoMain.cpp:(.text+0xaa2): undefined reference to `PK11_DeleteTokenPublicKey' cryptoMain.cpp:(.text+0xada): undefined reference to `SECKEY_DestroyPublicKeyList' cryptoMain.cpp:(.text+0xaeb): undefined reference to `SECKEY_DestroyPublicKey'
cryptoMain.o: In function `generateDHTerms(nsACString const&, nsACString&)':
cryptoMain.cpp:(.text+0x139a): undefined reference to `PK11_GetInternalKeySlot'
cryptoMain.cpp:(.text+0x13fe): undefined reference to `PK11_GenerateKeyPair'
cryptoMain.cpp:(.text+0x146f): undefined reference to `PK11_SetPrivateKeyNickname' cryptoMain.cpp:(.text+0x14c8): undefined reference to `SECKEY_DestroyPublicKey' cryptoMain.cpp:(.text+0x14d9): undefined reference to `SECKEY_DestroyPrivateKey'
cryptoMain.cpp:(.text+0x14ea): undefined reference to `PK11_FreeSlot'
cryptoMain.o: In function `getStage(nsACString const&, unsigned int&)':
cryptoMain.cpp:(.text+0x1553): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0x1587): undefined reference to `PK11_ListFixedKeysInSlot'
cryptoMain.cpp:(.text+0x15a6): undefined reference to `PK11_GetKeyLength'
cryptoMain.cpp:(.text+0x15bc): undefined reference to `PK11_FreeSymKey'
cryptoMain.o: In function `setStage(nsACString const&, unsigned int&)':
cryptoMain.cpp:(.text+0x161e): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0x1644): undefined reference to `PK11_DeleteTokenSymKey' cryptoMain.cpp:(.text+0x1666): undefined reference to `PK11_ListFixedKeysInSlot'
cryptoMain.cpp:(.text+0x16b9): undefined reference to `PK11_TokenKeyGen'
cryptoMain.cpp:(.text+0x16dc): undefined reference to `PK11_SetSymKeyNickname'
cryptoMain.cpp:(.text+0x16f6): undefined reference to `PK11_FreeSlot'
cryptoMain.cpp:(.text+0x1707): undefined reference to `PK11_FreeSymKey'
cryptoMain.o: In function `listSymKey(nsACString&)':
cryptoMain.cpp:(.text+0x1743): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0x1792): undefined reference to `PK11_ListFixedKeysInSlot' cryptoMain.cpp:(.text+0x17ab): undefined reference to `PK11_GetSymKeyNickname'
cryptoMain.cpp:(.text+0x185c): undefined reference to `PK11_GetNextSymKey'
cryptoMain.cpp:(.text+0x186a): undefined reference to `PK11_FreeSymKey'
cryptoMain.cpp:(.text+0x188a): undefined reference to `PK11_FreeSymKey'
cryptoMain.o: In function `listPublicKey(nsACString&)':
cryptoMain.cpp:(.text+0x18c0): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0x18e0): undefined reference to `PK11_ListPublicKeysInSlot'
cryptoMain.cpp:(.text+0x192a): undefined reference to `SECKEY_CopyPublicKey'
cryptoMain.cpp:(.text+0x1938): undefined reference to `PK11_GetPublicKeyNickname' cryptoMain.cpp:(.text+0x19a2): undefined reference to `SECKEY_DestroyPublicKeyList'
cryptoMain.cpp:(.text+0x19b3): undefined reference to `PK11_FreeSlot'
cryptoMain.o: In function `getSymKey(nsACString const&, PK11SymKeyStr**)':
cryptoMain.cpp:(.text+0x19da): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0x1a05): undefined reference to `PK11_ListFixedKeysInSlot'
cryptoMain.cpp:(.text+0x1a1e): undefined reference to `PK11_FreeSlot'
cryptoMain.o: In function `storeSymKey(nsACString const&, PK11SymKeyStr*)':
cryptoMain.cpp:(.text+0x1a7f): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0x1aca): undefined reference to `PK11_DeleteTokenSymKey' cryptoMain.cpp:(.text+0x1aec): undefined reference to `PK11_ListFixedKeysInSlot'
cryptoMain.cpp:(.text+0x1b24): undefined reference to `PK11_MoveSymKey'
cryptoMain.cpp:(.text+0x1b41): undefined reference to `PK11_SetSymKeyNickname' cryptoMain.cpp:(.text+0x1b8e): undefined reference to `PK11_DeleteTokenSymKey'
cryptoMain.cpp:(.text+0x1b9f): undefined reference to `PK11_FreeSlot'
cryptoMain.o: In function `getPrivateKey(nsACString const&, SECKEYPrivateKeyStr**)': cryptoMain.cpp:(.text+0x1be2): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0x1c0d): undefined reference to `PK11_ListPrivKeysInSlot' cryptoMain.cpp:(.text+0x1c2e): undefined reference to `SECKEY_CopyPrivateKey' cryptoMain.cpp:(.text+0x1c5f): undefined reference to `SECKEY_DestroyPrivateKeyList' cryptoMain.o: In function `getPublicKey(nsACString const&, SECKEYPublicKeyStr**)': cryptoMain.cpp:(.text+0x1ca1): undefined reference to `PK11_GetInternalKeySlot' cryptoMain.cpp:(.text+0x1cc4): undefined reference to `PK11_ListPublicKeysInSlot'
cryptoMain.cpp:(.text+0x1cee): undefined reference to `SECKEY_CopyPublicKey'
cryptoMain.cpp:(.text+0x1d29): undefined reference to `SECKEY_DestroyPublicKeyList'
cryptoMain.cpp:(.text+0x1d3a): undefined reference to `PK11_FreeSlot'
cryptoMain.o: In function `importPublicTerm(nsACString const&, SECKEYPublicKeyStr**)': cryptoMain.cpp:(.text+0x1da3): undefined reference to `PK11_GetInternalKeySlot'
cryptoMain.cpp:(.text+0x1dbc): undefined reference to `PORT_NewArena'
cryptoMain.cpp:(.text+0x1ddc): undefined reference to `PORT_ArenaZAlloc'
cryptoMain.cpp:(.text+0x1e22): undefined reference to `SECKEY_CreateDHPrivateKey'
cryptoMain.cpp:(.text+0x1e70): undefined reference to `PK11_FreeSlot'
cryptoMain.cpp:(.text+0x1e89): undefined reference to `PORT_FreeArena'
cryptoMain.o: In function `generateSecretKey(nsACString const&, SECKEYPublicKeyStr*, PK11SymKeyStr**)':
cryptoMain.cpp:(.text+0x1f28): undefined reference to `PK11_PubDerive'
cryptoMain.cpp:(.text+0x1f52): undefined reference to `SECKEY_DestroyPrivateKey' cryptoMain.o: In function `aesCipherOp(PK11SymKeyStr*, nsACString const&, char const*, unsigned long, nsACString&)':
cryptoMain.cpp:(.text+0x1fdd): undefined reference to `PK11_ParamFromIV'
cryptoMain.cpp:(.text+0x2036): undefined reference to `PK11_CreateContextBySymKey'
cryptoMain.cpp:(.text+0x2067): undefined reference to `PK11_GetMechanism'
cryptoMain.cpp:(.text+0x20d6): undefined reference to `PK11_CipherOp'
cryptoMain.cpp:(.text+0x212d): undefined reference to `PK11_DigestFinal'
cryptoMain.cpp:(.text+0x219b): undefined reference to `PK11_DestroyContext'
cryptoMain.cpp:(.text+0x21b4): undefined reference to `SECITEM_FreeItem'
nsOTRMailCrypt.o: In function `nsOTRMailCrypt::nsOTRMailCrypt()':
nsOTRMailCrypt.cpp:(.text+0x14e): undefined reference to `NSS_InitReadWrite'
nsOTRMailCrypt.cpp:(.text+0x159): undefined reference to `PK11_GetInternalKeySlot'
nsOTRMailCrypt.cpp:(.text+0x175): undefined reference to `PK11_InitPin'
nsOTRMailCrypt.o: In function `nsOTRMailCrypt::~nsOTRMailCrypt()':
nsOTRMailCrypt.cpp:(.text+0x1a6): undefined reference to `NSS_Shutdown'
nsOTRMailCrypt.o: In function `nsOTRMailCrypt::Encrypt(nsACString const&, nsACString const&, nsACString const&, nsACString&)': nsOTRMailCrypt.cpp:(.text+0x3af): undefined reference to `PK11_GenerateRandom' nsOTRMailCrypt.cpp:(.text+0x5e6): undefined reference to `PK11_GenerateRandom' nsOTRMailCrypt.cpp:(.text+0x70a): undefined reference to `PK11_GenerateRandom'
nsOTRMailCrypt.cpp:(.text+0x875): undefined reference to `PK11_FreeSymKey'
nsOTRMailCrypt.cpp:(.text+0x887): undefined reference to `PK11_FreeSymKey'
nsOTRMailCrypt.o: In function `nsOTRMailCrypt::Decrypt(nsACString const&, nsACString const&, nsACString const&, nsACString&)': nsOTRMailCrypt.cpp:(.text+0xf27): undefined reference to `PK11_ExtractKeyValue'
nsOTRMailCrypt.cpp:(.text+0x114c): undefined reference to `PK11_FreeSymKey'
nsOTRMailCrypt.cpp:(.text+0x115e): undefined reference to `PK11_FreeSymKey'
nsOTRMailCrypt.cpp:(.text+0x1170): undefined reference to `SECKEY_DestroyPublicKey' nsOTRMailCrypt.o: In function `nsOTRMailCrypt::GenerateSecretKey(nsACString const&, nsACString const&, nsACString&)': nsOTRMailCrypt.cpp:(.text+0x11cb): undefined reference to `PK11_GetInternalKeySlot' nsOTRMailCrypt.cpp:(.text+0x11f2): undefined reference to `PK11_ListPublicKeysInSlot' nsOTRMailCrypt.cpp:(.text+0x1235): undefined reference to `SECKEY_CopyPublicKey' nsOTRMailCrypt.cpp:(.text+0x1243): undefined reference to `PK11_GetPublicKeyNickname' nsOTRMailCrypt.cpp:(.text+0x12c4): undefined reference to `SECKEY_DestroyPublicKeyList' nsOTRMailCrypt.cpp:(.text+0x12d6): undefined reference to `SECKEY_DestroyPublicKey' nsOTRMailCrypt.o: In function `nsOTRMailCrypt::GetKeyAlgorithm(nsACString const&, nsACString&)': nsOTRMailCrypt.cpp:(.text+0x15dc): undefined reference to `PK11_GetSymKeyType'
nsOTRMailCrypt.cpp:(.text+0x1698): undefined reference to `PK11_FreeSymKey'
nsOTRMailCrypt.cpp:(.text+0x16aa): undefined reference to `SECKEY_DestroyPublicKey' nsOTRMailCrypt.o: In function `nsOTRMailCrypt::GetKeySize(nsACString const&, nsACString&)': nsOTRMailCrypt.cpp:(.text+0x1713): undefined reference to `SECKEY_DestroyPublicKey' nsOTRMailCrypt.cpp:(.text+0x172d): undefined reference to `PK11_GetKeyStrength'
nsOTRMailCrypt.cpp:(.text+0x1755): undefined reference to `PK11_FreeSymKey'
nsOTRMailCrypt.cpp:(.text+0x1767): undefined reference to `SECKEY_DestroyPublicKey' nsOTRMailCrypt.o: In function `nsOTRMailCrypt::FindExistingPublicKey(nsACString const&, nsACString&)': nsOTRMailCrypt.cpp:(.text+0x17e3): undefined reference to `SECKEY_DestroyPublicKey' /usr/bin/ld.bfd.real: libotrmailcrypt-x86-gcc3.so: hidden symbol `PK11_ListPrivKeysInSlot' isn't defined
/usr/bin/ld.bfd.real: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [libotrmailcrypt-x86-gcc3.so] Error 1

Appreciate if you can kindly reply to my email as soon as possible. Thank you.

Regards,
Brian Teh, Singapore

On 11/28/2012 7:43 AM, Wan-Teh Chang wrote:
2012/11/27 Brian Teh <tehhzs...@gmail.com>:

THUNDERBIRD_LDFLAGS =  -L$(THUNDERBIRD_OBJDIR_PATH)/mozilla/dist/lib \
                        -lxpcomglue_s    \
                        -lxpcom          \
                        -lmozalloc       \
                        -lnss            \
                        -lnssb           \
                        -lnssutil        \
                        -lnspr4          \
                        -lplds4          \
                        -lplc4           \
                        -shared          \
                        $(NULL)

This shows you are linking with NSS static libraries. You should link
with NSS shared libraries, which have different file names.

Replace -lnss -lnssb -lnssutil with -lnss3 -lnssutil3.

Wan-Teh


--
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to