[OpenOffice] [Boost_Document_Library] [GSoC'15] Unable to compile and run the examples in the OpenOffice SDK
I know this question should be sent to OpenOffice forum. I sent it to their dev list but did not get any response so i am mailing it here in hope to get a response. . I downloaded The OpenOffice 4.1.1 deb files and Sdk 4.1.1 deb file... I used dpkg from command line to install all the deb files.. They got installed in /opt/openoffice4 and Sdk in /opt/openoffice4/sdk . I had to use deb files from the website because i couldn't download it from the apt-get... It showed errors like could not find... I am Using Ubuntu 14.10! When i tried to compile any example in /opt/openoffice4/sdk/examples/DevelopersGuide/ProfUNO/ i got many errors.. . To overcame some of these i did : 1. copied all files from /opt/openoffice4/sdk/bin/ to my root folder /bin/ because the error said /bin/cppumaker : command not found 2. Used a conf file to load all libraries in linux linker cache... using sudo ldconfig because g++ showed error that libreg.so.3 was not found! 3. copied the types.rdb file from sdk folder to my root folder / because it said something about registries not loaded. 4. made a few variables in the makefile like OO_SDK_HOME, JAVA_HOME, JAVA_BIN to allow compilation... 5. Made folder for each example in /opt/openoffice4/sdk/LinuxExamples.out/bin folder because g++ always gave the error that the there was no file or folder of the name of the example that i was compiling. . Now, i am able to compile the examples but when i try to run them with : make office_connect.run or anything like that then again i am getting errors regarding command not found. cd ../../../../LINUXexample.out/bin && office_connect /bin/sh: 1: office_connect: not found Makefile:100: recipe for target 'office_connect.run' failed make: *** [office_connect.run] Error 127 I think it is because of this line in the makefile : %.run: $(OUT_BIN)/%$(EXE_EXT) cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) I have no experience of Makefiles and also i am new to openoffice sdk... I am guessing that these errors are happening beacause i installed the packages manually from dpkg instead of using apt-get... Also, i did use setsdkenv_unix once but i think it didnt work as expected as the variables in Makefile are NOT set.. . . It took me nearly a week to figure out these errors and now my patience is wearing out. I know that there has to be an elegant solution to this problem. Please help! . Abhinav
On April 22, 2015 12:05:27 PM EDT, Abhinav Tripathi
When i tried to compile any example in /opt/openoffice4/sdk/examples/DevelopersGuide/ProfUNO/ i got many errors.. . To overcame some of these i did : 1. copied all files from /opt/openoffice4/sdk/bin/ to my root folder /bin/ because the error said /bin/cppumaker : command not found
Editing PATH should have been enough.
2. Used a conf file to load all libraries in linux linker cache... using sudo ldconfig because g++ showed error that libreg.so.3 was not found!
Setting LD_LIBRARY_PATH should have solved that though one should try to avoid having to do that all of the time.
3. copied the types.rdb file from sdk folder to my root folder / because it said something about registries not loaded.
I know nothing of that.
4. made a few variables in the makefile like OO_SDK_HOME, JAVA_HOME, JAVA_BIN to allow compilation...
Some of those may have helped before steps 1-3.
5. Made folder for each example in /opt/openoffice4/sdk/LinuxExamples.out/bin folder because g++ always gave the error that the there was no file or folder of the name of the example that i was compiling.
I have no idea what's wrong there.
Now, i am able to compile the examples but when i try to run them with
cd ../../../../LINUXexample.out/bin && office_connect /bin/sh: 1: office_connect: not found
Adjust PATH?
Makefile:100: recipe for target 'office_connect.run' failed make: *** [office_connect.run] Error 127
I think it is because of this line in the makefile :
%.run: $(OUT_BIN)/%$(EXE_EXT) cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@)
Yes, that target produces the command line you showed above. Obviously, the examples are assumed to be run from a directory six or so levels deep, hence "cd ../../../../LINUXexample.out/bin". OTOH, it could be that OUT_BIN is being defined incorrectly because something else isn't set.
I have no experience of Makefiles and also i am new to openoffice sdk... I am guessing that these errors are happening beacause i installed the packages manually from dpkg instead of using apt-get...
I have no experience with the OpenOffice SDK, so I cannot offer any more concrete information. ___ Rob (Sent from my portable computation engine)
Thanks Rob. Can you please tell what things should I add to PATH? And one more thing, there is no file in the directory : ../../../../LINUXexample.out/bin It is empty always even after after compiling anything! So if you could explain the Makefile line : %.run: $(OUT_BIN)/%$(EXE_EXT) cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@) . I mean after cding... It is using " && $(basename $@)" is it enough to run any program from makefile? Shouldn't it have a prefix of "./". I am just guessing, I have absolutely no idea here. I just went through what basename does in a makefile and it seemed strange to me. . Abhinav
On April 22, 2015 10:58:46 PM EDT, Abhinav Tripathi
Thanks Rob. Can you please tell what things should I add to PATH?
The directory containing the applications you copied to /bin would have been the first addition to PATH. Beyond that, it's a question of finding the pieces that agent found on the PATH, and adding their directories. You can run find /opt/openoffice 64 -type f -name foo, for example.
And one more thing, there is no file in the directory : ../../../../LINUXexample.out/bin It is empty always even after after compiling anything!
Perhaps you're starting from the wrong directory? As I mentioned, the make variable OUT_BIN may be getting defined wrong for your purposes, leading to all of those ../. Have you tried searching for a directory named LINUXexample.out?
So if you could explain the Makefile line : %.run: $(OUT_BIN)/%$(EXE_EXT) cd $(subst /,$(PS),$(OUT_BIN)) && $(basename $@)
When you run make foo.run, $(OUT_BIN)/%$(EXE_EXT) is built of it doesn't exist, then the command is run. The $(subst) just ensures the right path separator is used for the platform. $(basename $@) computes foo.run from the /some/path/foo.run you type.
I mean after cding... It is using " && $(basename $@)" is it enough to run any program from makefile?
They apparently think it is appropriate for all of their tools.
Shouldn't it have a prefix of "./".
They are, it seems, assuming ./ in your PATH. Even better would be the following: set PATH=$(subst /,$(PS),$(OUT_BIN)):$ PATH && $@ However, you'd need another platform specific variable for : vs. ; to make that generic.
I am just guessing, I have absolutely no idea here. I just went through what basename does in a makefile and it seemed strange to me.
The ./ assumption is definitely worth reporting as a bug. The rest of the issues could be something you've missed, whether because you didn't see some file with instructions or because they weren't included in the packages you installed. It's also possible that the packages are broken. They could be mixing incompatible files. I think you'll have to rely on searching the web and the OpenOffice developers' forums or mailing lists for anything more. ___ Rob (Sent from my portable computation engine)
Thanks Rob. . Have you tried searching for a directory named LINUXexample.out?
Yes I did!. It exists in the sdk folder. And contains several other folders like bin,misc,inc,obj.... .o files get generated in the LINUXexample.out/obj directory but no executable is generated in the corresponding ../bin directory. The ./ assumption is definitely worth reporting as a bug. The rest of the
issues could be something you've missed, whether because you didn't see some file with instructions or because they weren't included in the packages you installed.
Well, i followed the compilation procedures. I just didnt follow the installation ones because apt-get and even PackageManger GUI couldn't find the sdk packages. So i directly downloaded the .deb files from OpenOffice site and used dpkg from command line. There were no instructions for using dpkg though... . I will try and install everything fresh OR will use LibreOffice sdk instead (apt-get is able to find that) because both sdk are similar (or so i have heard)... This time i will use your suggestions if i get the same errors... . Thanks for helping! . Abhinav
participants (2)
-
Abhinav Tripathi
-
Rob Stewart