Re: Undefined simbols moz_xmalloc (et al.) in Gecko 12

2012-05-24 Thread Babele Dunnit


Hi Benjamin,

Thanks for your reply. My app is a C++ Gecko full embedding, I am
using "frozen linkage - standalone glue", according to
https://developer.mozilla.org/en/XPCOM_Glue , which I believe is the
"independent" glue. It is in production with Gecko7 and everything
works there, so I am toying around with latest geckos just to check
your latest improvements.

Strange thing is, I have no problem compiling/linking vs (for example)
Gecko11: I just change a symlink in my codebase, clean all and
rebuild, same makefiles, no hassles. It seems something has forced
this link dependence moving from Gecko11 to Gecko12.

I am building both Xulrunner/Gecko11 and Xulrunner/Gecko12 with the
same .mozconfig. (which is just standard, plus RTTI turned on, I need
that). My developement environment is Linux Ubuntu 12.04.

Aha: I got what you mean... you are talking about
https://developer.mozilla.org/en/XPCOM_Glue/XPCOM_Glue_without_mozalloc.
Exactly, it seems something in Gecko12 (in my build) has forced a
similar dependence ALSO on the standalone glue.

In fact, this problem is not so hard to solve... As you suggest,
linking mozalloc solves the issue... nearly, :) because now I have now
a crash here:

Thread [1] 21004 [core: 0] (Suspended : Signal : SIGSEGV:Segmentation
fault)
0x0
mozilla::storage::() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/storage/src/mozStorageService.cpp:568 0xb1a5b7ce
mallocWithAlarm() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/db/sqlite3/src/sqlite3.c:18,778 0xb2b7daec
sqlite3Malloc() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/db/sqlite3/src/sqlite3.c:18,822 0xb2b83ffa
sqlite3Malloc() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/db/sqlite3/src/sqlite3.c:18,809 0xb2b83ffa
sqlite3MallocZero() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/db/sqlite3/src/sqlite3.c:19,086 0xb2b845e7
pthreadMutexAlloc() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/db/sqlite3/src/sqlite3.c:17,966 0xb2b8ca39
pthreadMutexAlloc() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/db/sqlite3/src/sqlite3.c:17,954 0xb2b8ca39
sqlite3MutexAlloc() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/db/sqlite3/src/sqlite3.c:17,280 0xb2b7d87f
sqlite3_initialize() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/db/sqlite3/src/sqlite3.c:112,346 0xb2b8d37f
sqlite3_initialize() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/db/sqlite3/src/sqlite3.c:46,765 0xb2b8d37f
mozilla::storage::Service::initialize() at /home/brancotti/projects/
Mozilla/src/firefox-12.0.source/storage/src/mozStorageService.cpp:616
0xb1a5d161
mozilla::storage::Service::getSingleton() at /home/brancotti/projects/
Mozilla/src/firefox-12.0.source/storage/src/mozStorageService.cpp:402
0xb1a5d3de
ServiceConstructor() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/storage/build/mozStorageModule.cpp:53 0xb1a5ae5f
mozilla::storage::ServiceConstructor() at /home/brancotti/projects/
Mozilla/src/firefox-12.0.source/storage/build/mozStorageModule.cpp:54
0xb1a5ae5f
mozilla::GenericFactory::CreateInstance() at /home/brancotti/projects/
Mozilla/obj/gre12_fortifySource_disabledStuff/xpcom/build/
GenericFactory.cpp:48 0xb1c19adf
CreateInstanceByContractID() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/xpcom/components/nsComponentManager.cpp:1,064
0xb1c43a1b
nsComponentManagerImpl::CreateInstanceByContractID() at /home/
brancotti/projects/Mozilla/src/firefox-12.0.source/xpcom/components/
nsComponentManager.cpp:1,013 0xb1c43a1b
GetServiceByContractID() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/xpcom/components/nsComponentManager.cpp:1,466
0xb1c445c4
nsComponentManagerImpl::GetServiceByContractID() at /home/brancotti/
projects/Mozilla/src/firefox-12.0.source/xpcom/components/
nsComponentManager.cpp:1,378 0xb1c445c4
CallGetService() at /home/brancotti/projects/Mozilla/obj/
gre12_fortifySource_disabledStuff/xpcom/build/
nsComponentManagerUtils.cpp:94 0xb1c1492d
nsGetServiceByContractIDWithError::operator() at /home/brancotti/
projects/Mozilla/obj/gre12_fortifySource_disabledStuff/xpcom/build/
nsComponentManagerUtils.cpp:288 0xb1c14bd3
nsCOMPtr_base::assign_from_gs_contractid_with_error() at /home/
brancotti/projects/Mozilla/obj/gre12_fortifySource_disabledStuff/xpcom/
build/nsCOMPtr.cpp:141 0xb1c140af
operator=() at /home/brancotti/projects/Mozilla/obj/
gre12_fortifySource_disabledStuff/dist/include/nsCOMPtr.h:709
0xb12624ad
nsCookieService::Init() at /home/brancotti/projects/Mozilla/src/
firefox-12.0.source/netwerk/cookie/nsCookieService.cpp:644 0xb12624ad
nsCookieService::GetSingleton() at /home/brancotti/projects/Mozilla/

Re: Undefined simbols moz_xmalloc (et al.) in Gecko 12

2012-05-21 Thread Benjamin Smedberg

On 5/18/2012 4:20 AM, Babele Dunnit wrote:

Hi everybody,

I am updating our embedding app from Gecko7 to Gecko12. I get linking
errors:

In function `operator new(unsigned int)':
/dist/include/mozilla/mozalloc.h:229: undefined reference to
`moz_xmalloc'

In function `operator new[](unsigned int)':
/dist/include/mozilla/mozalloc.h:241: undefined reference to
`moz_xmalloc'

In function `operator delete(void*)':
/dist/include/mozilla/mozalloc.h:253: undefined reference to
`moz_free'

In function `operator delete[](void*)':
dist/include/mozilla/mozalloc.h:265: undefined reference to `moz_free'

I am building xulrunner with a default .mozconfig, with just

ac_add_options --enable-cpp-rtti

added.

Any advice (apart from copying the sources and forcing the compilation/
linking, which I will do now) ?
These errors occur while linking your embedding app? Are you using 
dependent or independent glue? I think you would need to end up linking 
against mozutil (which contains mozalloc IIRC), but that might depend on 
how you're linking to begin with.


--BDS

___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Re: Undefined simbols moz_xmalloc (et al.) in Gecko 12

2012-05-18 Thread Babele Dunnit

Sorry, I forgot: Linux, GTK embedding, Ubuntu 12.04.

On May 18, 10:20 am, Babele Dunnit  wrote:
> Hi everybody,
>
> I am updating our embedding app from Gecko7 to Gecko12. I get linking
> errors:
>
> In function `operator new(unsigned int)':
> /dist/include/mozilla/mozalloc.h:229: undefined reference to
> `moz_xmalloc'
>
> In function `operator new[](unsigned int)':
> /dist/include/mozilla/mozalloc.h:241: undefined reference to
> `moz_xmalloc'
>
> In function `operator delete(void*)':
> /dist/include/mozilla/mozalloc.h:253: undefined reference to
> `moz_free'
>
> In function `operator delete[](void*)':
> dist/include/mozilla/mozalloc.h:265: undefined reference to `moz_free'
>
> I am building xulrunner with a default .mozconfig, with just
>
> ac_add_options --enable-cpp-rtti
>
> added.
>
> Any advice (apart from copying the sources and forcing the compilation/
> linking, which I will do now) ?
>
> Thanks,
> Aaron

___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding


Undefined simbols moz_xmalloc (et al.) in Gecko 12

2012-05-18 Thread Babele Dunnit
Hi everybody,

I am updating our embedding app from Gecko7 to Gecko12. I get linking
errors:

In function `operator new(unsigned int)':
/dist/include/mozilla/mozalloc.h:229: undefined reference to
`moz_xmalloc'

In function `operator new[](unsigned int)':
/dist/include/mozilla/mozalloc.h:241: undefined reference to
`moz_xmalloc'

In function `operator delete(void*)':
/dist/include/mozilla/mozalloc.h:253: undefined reference to
`moz_free'

In function `operator delete[](void*)':
dist/include/mozilla/mozalloc.h:265: undefined reference to `moz_free'

I am building xulrunner with a default .mozconfig, with just

ac_add_options --enable-cpp-rtti

added.

Any advice (apart from copying the sources and forcing the compilation/
linking, which I will do now) ?

Thanks,
Aaron

___
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding