Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have just got involved in apache Openoffice project. Downloaded the source and tried to build in Ubuntu 14.04, but I'm getting the linker error:

/usr/lib/x86_64-linux-gnu/libc_nonshared.a : undefined reference to '__cxa_atexit' symbol
collect2: ld returned symbol 1 error
After doing nm on the libraries, I found out that __cxa_atexit is actually defined in libc.a which is also in the same folder as libc_nonshared.a. I'm stuck. I don't know why the linker couldn't take libc.a.

I tried adding various options, such as -lc, -Wl,--undefined=__cxa_atexit,-Wl,--start-group -Wl,--end-group but none of them is working.

The source is building and linking without any problem in Ubuntu12.04.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.