Hi All,

I had built a xpcom component for Firefox 1.5 in linux.

Then i placed the component under firefox/components/ directory.

Now i tried to execute `ld components/libqecomp_FIREFOX_1.so` to find any failed dependencies.

It throwed the error (given below Error from ld command). Hence as given in the warning i executed `ld -rpath . components/libqecomp_FIREFOX_1.so` from firefox folder. Then the ld doesn't throw any error.

So i assume there may be a problem in linking while creating the component.

The following is the command that is executed to link the component against needed libraries,

c++ -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -fPIC -O  -shared -Wl,-h -Wl,libqecomp_.so -o libqecomp_.so src/Debug.o src/regex.o src/nsRecorderImpl.o src/nsQEngineImpl.o src/nsQEngineModule.o src/ClientSocket.o src/nsPlayBack.o src/nsPlayBackUtils.o src/nsValidator.o   -Wl,--version-script -Wl,/home/sabarinathan/srini/src/mozilla/build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic /home/sabarinathan/srini/src/mozilla/dist/lib/libxpcomglue_s.a -L/home/sabarinathan/srini/src/mozilla/dist/bin -lxpcom -lxpcom_core -L/home/sabarinathan/srini/src/mozilla/dist/bin -L/home/sabarinathan/srini/src/mozilla/dist/lib/ -lplds4 -lplc4 -lnspr4 -lpthread -ldl -L/home/sabarinathan/srini/src/mozilla/dist/lib -lmozjs -lnss3 -lxpcom_compat -lpthread  -ldl -lm

The component is linked against the libraries from the compiled firefox 1.5 source (/home/sabarinathan/srini/src/mozilla/).

Please let me know whether it is a problem with linking or any environment variable.

C++ version i used is :    "c++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)"

Error from ld command:
ld: warning: libxpcom_core.so, needed by ../libqecomp_FIREFOX_1.so, not found (try using -rpath or -rpath-link)
ld: warning: libxpcom_compat.so, needed by ../libqecomp_FIREFOX_1.so, not found (try using -rpath or -rpath-link)
ld: warning: cannot find entry symbol _start; not setting start address
../libqecomp_FIREFOX_1.so: undefined reference to `nsAString_internal::Length() const'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::ReplaceSubstring(nsString const&, nsString const&)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsAString_internal::Append(nsAString_internal const&)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::Replace(unsigned, unsigned, nsAString_internal const&)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsCharTraits<char>::sEmptyBuffer'
../libqecomp_FIREFOX_1.so: undefined reference to `NS_NewThread(nsIThread**, nsIRunnable*, unsigned, PRThreadState, PRThreadPriority, PRThreadScope)'
../libqecomp_FIREFOX_1.so: undefined reference to `NS_Alloc'
../libqecomp_FIREFOX_1.so: undefined reference to `nsAString_internal::~nsAString_internal()'
../libqecomp_FIREFOX_1.so: undefined reference to `NS_GetServiceManager_P'
../libqecomp_FIREFOX_1.so: undefined reference to `nsVoidArray::nsVoidArray()'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::Replace(unsigned, unsigned, unsigned short const*, unsigned)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::Assign(nsAString_internal const&)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::Equals(nsAString_internal const&) const'
../libqecomp_FIREFOX_1.so: undefined reference to `nsCSubstring::Assign(nsCSubstring const&)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsVoidArray::ReplaceElementAt(void*, int)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::Trim(char const*, int, int, int)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::ToInteger(int*, unsigned) const'
../libqecomp_FIREFOX_1.so: undefined reference to `nsVoidArray::InsertElementAt(void*, int)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::Equals(nsSubstring const&) const'
../libqecomp_FIREFOX_1.so: undefined reference to `nsCharTraits<unsigned short>::sEmptyBuffer'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::Assign(nsSubstring const&)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::ReplaceASCII(unsigned, unsigned, char const*, unsigned)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::Assign(unsigned short const*, unsigned)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::AssignASCII(char const*)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::AssignWithConversion(char const*, int)'
../libqecomp_FIREFOX_1.so: undefined reference to `AppendUTF16toUTF8(nsAString_internal const&, nsACString_internal&)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::EqualsIgnoreCase(char const*, int) const'
../libqecomp_FIREFOX_1.so: undefined reference to `nsAString_internal::Equals(nsAString_internal const&) const'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::Find(char const*, int, int, int) const'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::AppendWithConversion(char const*, int)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsObsoleteACString::sCanonicalVTable'
../libqecomp_FIREFOX_1.so: undefined reference to `nsCSubstring::Equals(nsCSubstring const&) const'
../libqecomp_FIREFOX_1.so: undefined reference to `nsCSubstring::Assign(char const*, unsigned)'
../libqecomp_FIREFOX_1.so: undefined reference to `LossyCopyUTF16toASCII(nsAString_internal const&, nsACString_internal&)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsAString_internal::Assign(nsAString_internal const&)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::AppendInt(int, int)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::RFind(char const*, int, int, int) const'
../libqecomp_FIREFOX_1.so: undefined reference to `nsObsoleteAString::sCanonicalVTable'
../libqecomp_FIREFOX_1.so: undefined reference to `nsCString::AppendInt(long long, int)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsString::ReplaceSubstring(unsigned short const*, unsigned short const*)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsSubstring::SetLength(unsigned)'
../libqecomp_FIREFOX_1.so: undefined reference to `nsACString_internal::~nsACString_internal()'


Kindly help me in this problem.

Thanks & Regards,
Sabarianathan

Reply via email to