<div dir="ltr"><div>===== SOLVED =====</div><div><br></div>I was able to fix it myself.<br><br>For fixing linking error you need to edit "vcl/Library_vcl.mk"<br><br>==============Before===================== <br><div>ifeq ($(ENABLE_HEADLESS),TRUE)</div><div>$(eval $(call gb_Library_add_exception_objects,vcl,\</div><div><span class="" style="white-space:pre"> </span>$(vcl_generic_code) \</div><div>    vcl/unx/generic/printer/jobdata \</div><div>    vcl/unx/generic/printer/ppdparser \</div><div>    vcl/null/printerinfomanager \</div><div>    vcl/headless/headlessinst \</div><div>))<br></div><div><br></div><div>$(eval $(call gb_Library_use_externals,vcl,\</div><div><span class="" style="white-space:pre">       </span>fontconfig \</div><div><span class="" style="white-space:pre">       </span>freetype \</div><div>))</div><div>endif</div><div>====================================== <br></div><div><br></div><div>=============== After ================</div><div><div>ifeq ($(ENABLE_HEADLESS),TRUE)</div><div>$(eval $(call gb_Library_add_exception_objects,vcl,\</div><div><span class="" style="white-space:pre">  </span>$(vcl_generic_code) \</div><div>    vcl/unx/generic/printer/jobdata \</div><div>    vcl/unx/generic/printer/ppdparser \</div><div>    vcl/null/printerinfomanager \</div><div>    vcl/headless/headlessinst \</div><div>    $(vcl_headless_code) \</div><div>    $(vcl_headless_freetype_code) \</div><div>))</div><div><br></div><div>$(eval $(call gb_Library_use_libraries,vcl,\</div><div><span class="" style="white-space:pre">  </span>basebmp \</div><div>))</div><div><br></div><div>$(eval $(call gb_Library_use_externals,vcl,\</div><div><span class="" style="white-space:pre">     </span>fontconfig \</div><div><span class="" style="white-space:pre">       </span>freetype \</div><div>))</div><div>endif</div></div><div><br></div><div>====================================== <br></div><div><br></div><div>You also need to add "basebmp" entry because later you would get linking error again because "vcl/headless/svpbmp.cxx" is using "basebmp".<br><br><br>After this you would get few other errors as </div><div><br><div style="font-size:12.8000001907349px">ERROR: Removing file ui-previewer from file list.</div><div style="font-size:12.8000001907349px">: ERROR: Removing file shell_scripts_gnome.filelist from file list.</div><div style="font-size:12.8000001907349px">: ERROR: Removing file shell_scripts_kde.filelist from file list.</div><div style="font-size:12.8000001907349px">: ERROR: Removing file shell_scripts.filelist from file list.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Since you don't need these in headless so delete these entries from "workdir/InstallScriptTarget/setup_osl.ins"<br>similar to <a href="http://libreoffice-bugs.freedesktop.narkive.com/kFp7vjv9/bug-78857-new-error-source-for-bsh-jar-not-found-when-building-with-java-no">http://libreoffice-bugs.freedesktop.narkive.com/kFp7vjv9/bug-78857-new-error-source-for-bsh-jar-not-found-when-building-with-java-no</a></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Thanks</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 June 2015 at 22:30, Abhimanyu Singh <span dir="ltr"><<a href="mailto:abhimanyusingh@google.com" target="_blank">abhimanyusingh@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I can build libreoffice(latest code) completely without any error but when I tried to build it in headless mode as mentioned here<br></div><div><a href="https://wiki.documentfoundation.org/Development/HeadlessBuild" target="_blank">https://wiki.documentfoundation.org/Development/HeadlessBuild</a><br></div><div><br></div><div>I am getting linking error for "headlessinst.o" as </div><div><br></div><div><div>usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o: In function `HeadlessSalInstance::~HeadlessSalInstance()':</div><div>headlessinst.cxx:(.text+0x4f): undefined reference to `SvpSalInstance::~SvpSalInstance()'</div></div><div><br></div><div><br></div><div>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".</div><div><br></div><div><br></div><div>FYI for full build(without headless option) directory "workdir/CxxObject/vcl/headless/" contains "svpinst.o" . It is having issue only in --without-x build.</div><div><br></div><div><br></div><div><div>Any help on this would be really great.</div></div><div><br></div><div>Thanks</div><div><br></div><div>complete log:-</div><div><br></div><div><div>usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o: In function `HeadlessSalInstance::~HeadlessSalInstance()':</div><div>headlessinst.cxx:(.text+0x4f): undefined reference to `SvpSalInstance::~SvpSalInstance()'</div><div>/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o: In function `HeadlessSalInstance::HeadlessSalInstance(SalYieldMutex*)':</div><div>headlessinst.cxx:(.text+0xb5): undefined reference to `SvpSalInstance::SvpSalInstance(SalYieldMutex*)'</div><div>/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o: In function `CreateSalInstance()':</div><div>headlessinst.cxx:(.text+0x31f): undefined reference to `SvpSalInstance::SvpSalInstance(SalYieldMutex*)'</div><div>/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o: In function `HeadlessSalInstance::~HeadlessSalInstance()':</div><div>headlessinst.cxx:(.text+0x3b): undefined reference to `SvpSalInstance::~SvpSalInstance()'</div><div>/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o: In function `HeadlessSalSystem::~HeadlessSalSystem()':</div><div>headlessinst.cxx:(.text._ZN17HeadlessSalSystemD2Ev[_ZN17HeadlessSalSystemD5Ev]+0xb): undefined reference to `SvpSalSystem::~SvpSalSystem()'</div><div>/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/workdir/CxxObject/vcl/headless/headlessinst.o: In function `HeadlessSalSystem::~HeadlessSalSystem()':</div><div>headlessinst.cxx:(.text._ZN17HeadlessSalSystemD0Ev[_ZN17HeadlessSalSystemD0Ev]+0xf): undefined reference to `SvpSalSystem::~SvpSalSystem()'</div><div>/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'</div><div>/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'</div><div>/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)'</div><div>/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)'</div><div>/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*)'</div><div>/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)'</div><div>/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*)'</div><div>/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*)'</div><div>/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*)'</div><div>/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*)'</div><div>/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*)'</div><div>/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*)'</div><div>/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*)'</div><div>/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*)'</div><div>/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*)'</div><div>/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()'</div><div>/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()'</div><div>/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()'</div><div>/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()'</div><div>/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)'</div><div>/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)'</div><div>/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()'</div><div>/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&)'</div><div>/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&)'</div><div>/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()'</div><div>/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()'</div><div>/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()'</div><div>/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)'</div><div>/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)'</div><div>collect2: error: ld returned 1 exit status</div><div>make[1]: *** [/usr/local/home/abhimanyusingh/Documents/libreoffice_headless/core/instdir/program/libvcllo.so] Error 1</div><div>make: *** [build] Error 2</div></div><div><br></div><div><br></div></div>
</blockquote></div><br></div>