===== SOLVED =====
I was able to fix it myself.
For fixing linking error you need to edit "vcl/Library_vcl.mk"
==============Before=====================
ifeq ($(ENABLE_HEADLESS),TRUE)
$(eval $(call gb_Library_add_exception_objects,vcl,\
$(vcl_generic_code) \
vcl/unx/generic/printer/jobdata \
vcl/unx/generic/printer/ppdparser \
vcl/null/printerinfomanager \
vcl/headless/headlessinst \
))
$(eval $(call gb_Library_use_externals,vcl,\
fontconfig \
freetype \
))
endif
======================================
=============== After ================
ifeq ($(ENABLE_HEADLESS),TRUE)
$(eval $(call gb_Library_add_exception_objects,vcl,\
$(vcl_generic_code) \
vcl/unx/generic/printer/jobdata \
vcl/unx/generic/printer/ppdparser \
vcl/null/printerinfomanager \
vcl/headless/headlessinst \
$(vcl_headless_code) \
$(vcl_headless_freetype_code) \
))
$(eval $(call gb_Library_use_libraries,vcl,\
basebmp \
))
$(eval $(call gb_Library_use_externals,vcl,\
fontconfig \
freetype \
))
endif
======================================
You also need to add "basebmp" entry because later you would get linking
error again because "vcl/headless/svpbmp.cxx" is using "basebmp".
After this you would get few other errors as
ERROR: Removing file ui-previewer from file list.
: ERROR: Removing file shell_scripts_gnome.filelist from file list.
: ERROR: Removing file shell_scripts_kde.filelist from file list.
: ERROR: Removing file shell_scripts.filelist from file list.
Since you don't need these in headless so delete these entries from
"workdir/InstallScriptTarget/setup_osl.ins"
similar to
http://libreoffice-bugs.freedesktop.narkive.com/kFp7vjv9/bug-78857-new-error-source-for-bsh-jar-not-found-when-building-with-java-no
Thanks
On 16 June 2015 at 22:30, Abhimanyu Singh <abhimanyusingh@google.com> wrote:
I can build libreoffice(latest code) completely without any error but when
I tried to build it in headless mode as mentioned here
https://wiki.documentfoundation.org/Development/HeadlessBuild
I am getting linking error for "headlessinst.o" as
usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:
In function `HeadlessSalInstance::~HeadlessSalInstance()':
headlessinst.cxx:(.text+0x4f): undefined reference to
`SvpSalInstance::~SvpSalInstance()'
What I found surprising that in directory
"workdir/CxxObject/vcl/headless/" only "headlessinst.o" file is there.
There is no file as "svpinst.o" for "svpinst.cxx" which contains definition
of "SvpSalInstance".
FYI for full build(without headless option) directory
"workdir/CxxObject/vcl/headless/" contains "svpinst.o" . It is having issue
only in --without-x build.
Any help on this would be really great.
Thanks
complete log:-
usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:
In function `HeadlessSalInstance::~HeadlessSalInstance()':
headlessinst.cxx:(.text+0x4f): undefined reference to
`SvpSalInstance::~SvpSalInstance()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:
In function `HeadlessSalInstance::HeadlessSalInstance(SalYieldMutex*)':
headlessinst.cxx:(.text+0xb5): undefined reference to
`SvpSalInstance::SvpSalInstance(SalYieldMutex*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:
In function `CreateSalInstance()':
headlessinst.cxx:(.text+0x31f): undefined reference to
`SvpSalInstance::SvpSalInstance(SalYieldMutex*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:
In function `HeadlessSalInstance::~HeadlessSalInstance()':
headlessinst.cxx:(.text+0x3b): undefined reference to
`SvpSalInstance::~SvpSalInstance()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:
In function `HeadlessSalSystem::~HeadlessSalSystem()':
headlessinst.cxx:(.text._ZN17HeadlessSalSystemD2Ev[_ZN17HeadlessSalSystemD5Ev]+0xb):
undefined reference to `SvpSalSystem::~SvpSalSystem()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:
In function `HeadlessSalSystem::~HeadlessSalSystem()':
headlessinst.cxx:(.text._ZN17HeadlessSalSystemD0Ev[_ZN17HeadlessSalSystemD0Ev]+0xf):
undefined reference to `SvpSalSystem::~SvpSalSystem()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTI19HeadlessSalInstance[_ZTI19HeadlessSalInstance]+0x10):
undefined reference to `typeinfo for SvpSalInstance'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTI17HeadlessSalSystem[_ZTI17HeadlessSalSystem]+0x10):
undefined reference to `typeinfo for SvpSalSystem'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x28):
undefined reference to `SvpSalInstance::CreateChildFrame(SystemParentData*,
unsigned long)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x30):
undefined reference to `SvpSalInstance::CreateFrame(SalFrame*, unsigned
long)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x38):
undefined reference to `SvpSalInstance::DestroyFrame(SalFrame*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x40):
undefined reference to `SvpSalInstance::CreateObject(SalFrame*,
SystemWindowData*, bool)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x48):
undefined reference to `SvpSalInstance::DestroyObject(SalObject*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x50):
undefined reference to `SvpSalInstance::CreateVirtualDevice(SalGraphics*,
long&, long&, unsigned short, SystemGraphicsData const*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x58):
undefined reference to
`SvpSalInstance::CreateInfoPrinter(SalPrinterQueueInfo*, ImplJobSetup*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x60):
undefined reference to `SvpSalInstance::DestroyInfoPrinter(SalInfoPrinter*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x68):
undefined reference to `SvpSalInstance::CreatePrinter(SalInfoPrinter*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x70):
undefined reference to `SvpSalInstance::DestroyPrinter(SalPrinter*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x78):
undefined reference to
`SvpSalInstance::GetPrinterQueueInfo(ImplPrnQueueList*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x80):
undefined reference to
`SvpSalInstance::GetPrinterQueueState(SalPrinterQueueInfo*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x88):
undefined reference to
`SvpSalInstance::DeletePrinterQueueInfo(SalPrinterQueueInfo*)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x90):
undefined reference to `SvpSalInstance::GetDefaultPrinter()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x98):
undefined reference to `SvpSalInstance::CreateSalTimer()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0xa0):
undefined reference to `SvpSalInstance::CreateI18NImeStatus()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0xb0):
undefined reference to `SvpSalInstance::CreateSalBitmap()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0xd8):
undefined reference to `SvpSalInstance::Yield(bool, bool)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0xe0):
undefined reference to `SvpSalInstance::AnyInput(VclInputFlags)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x108):
undefined reference to `SvpSalInstance::CreateSalSession()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x110):
undefined reference to
`SvpSalInstance::GetConnectionIdentifier(SalInstance::ConnectionIdentifierType&,
int&)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x138):
undefined reference to
`SvpSalInstance::AddToRecentDocumentList(rtl::OUString const&,
rtl::OUString const&, rtl::OUString const&)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x170):
undefined reference to `SvpSalInstance::PostPrintersChanged()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV19HeadlessSalInstance[_ZTV19HeadlessSalInstance]+0x178):
undefined reference to `SvpSalInstance::CreatePrintGraphics()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV17HeadlessSalSystem[_ZTV17HeadlessSalSystem]+0x20):
undefined reference to `SvpSalSystem::GetDisplayScreenCount()'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV17HeadlessSalSystem[_ZTV17HeadlessSalSystem]+0x38):
undefined reference to
`SvpSalSystem::GetDisplabyScreenPosSizePixel(unsigned int)'
/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o:(.data.rel.ro._ZTV17HeadlessSalSystem[_ZTV17HeadlessSalSystem]+0x40):
undefined reference to `SvpSalSystem::GetDisplayScreenName(unsigned int)'
collect2: error: ld returned 1 exit status
make[1]: ***
[/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/instdir/program/libvcllo.so]
Error 1
make: *** [build] Error 2
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.