You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Abhinav Tripathi <ee...@iiti.ac.in> on 2015/04/22 10:01:30 UTC

[OO_SDK] [linux] [Makefile] Errors while compiling examples in sdk

Hello!
I downloaded The OpenOffice deb files and Sdk 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 could download it from
the apt-get...
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 overcome some of these i did :
1. copied all files from sdk/bin/ to my root folder /bin/ because the error
said /bin/cppumaker : command not found
2. copied the types.rdb files to my root folder / because it said something
about registries not loaded.
3. made a few variables in the makefile like OO_SDK_HOME JAVA_HOME JAVA_BIN
to allow compilation...
4. Made folder for each example in LinuxExamples.out/bin folder because g++
always gave the error that no file or folder.
.
Now, i am able to compile the examples but when i try to run them with :
make string_samples.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 has to be an elegant solution to this problem.
Please help!
.
Abhinav

Re: [OO_SDK] [linux] [Makefile] Errors while compiling examples in sdk

Posted by Abhinav Tripathi <ee...@iiti.ac.in>.
Thank you very much.
.
I am a beginner to linux shell...
Now everything works fine.
Really you helped a lot!
.
Regards,
Abhinav
On 24-Apr-2015 12:04 PM, "Ariel Constenla-Haile" <ar...@apache.org> wrote:

> Hello Abhinav,
>
> On Fri, Apr 24, 2015 at 11:21:04AM +0530, Abhinav Tripathi wrote:
> > I tried to compile the examples again and i found that if i run
> > setsdkenv_unix from /opt/openoffice4/sdk then everything runs fine and
> the
> > examples compile.
> > But if i run setsdkenv_unix.sh from ~/openoffice4.1_sdk/ubuntu then
> errors
> > still arise. After a little digging, i found that it is because of the
> > current shell being closed as the sh script closes. so i used opened a
> new
> > shell and then ran it using :
> > bash
> > . ~/openoffice4.1_sdk/ubuntu/setsdkenv_unix.sh
> > now as long as i dont close the current shell using 'exit' i am able to
> > build the exmples.
> > .
> > I just wanted to ask if it is meant like this to always run the
> > setsdkenv_unix from sdk folder or if opening a new shell and running from
> > home directory is mandatory?
>
> You need to open a terminal and source
> ~/openoffice4.1_sdk/ubuntu/setsdkenv_unix.sh
>
> source ~/openoffice4.1_sdk/ubuntu/setsdkenv_unix.sh
>
> and make the examples inside this terminal with the SDK env. set by the
> script.
>
> Running from /opt/openoffice4/sdk/setsdkenv_unix is also fine; just read
> the script, you'll see that if you don't pass --force-configure and the
> already configured script exists in your home, it will source it.
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>

Re: [OO_SDK] [linux] [Makefile] Errors while compiling examples in sdk

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hello Abhinav,

On Fri, Apr 24, 2015 at 11:21:04AM +0530, Abhinav Tripathi wrote:
> I tried to compile the examples again and i found that if i run
> setsdkenv_unix from /opt/openoffice4/sdk then everything runs fine and the
> examples compile.
> But if i run setsdkenv_unix.sh from ~/openoffice4.1_sdk/ubuntu then errors
> still arise. After a little digging, i found that it is because of the
> current shell being closed as the sh script closes. so i used opened a new
> shell and then ran it using :
> bash
> . ~/openoffice4.1_sdk/ubuntu/setsdkenv_unix.sh
> now as long as i dont close the current shell using 'exit' i am able to
> build the exmples.
> .
> I just wanted to ask if it is meant like this to always run the
> setsdkenv_unix from sdk folder or if opening a new shell and running from
> home directory is mandatory?

You need to open a terminal and source ~/openoffice4.1_sdk/ubuntu/setsdkenv_unix.sh

source ~/openoffice4.1_sdk/ubuntu/setsdkenv_unix.sh

and make the examples inside this terminal with the SDK env. set by the
script.

Running from /opt/openoffice4/sdk/setsdkenv_unix is also fine; just read
the script, you'll see that if you don't pass --force-configure and the
already configured script exists in your home, it will source it.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: [OO_SDK] [linux] [Makefile] Errors while compiling examples in sdk

Posted by Abhinav Tripathi <ee...@iiti.ac.in>.
I tried to compile the examples again and i found that if i run
setsdkenv_unix from /opt/openoffice4/sdk then everything runs fine and the
examples compile.
But if i run setsdkenv_unix.sh from ~/openoffice4.1_sdk/ubuntu then errors
still arise. After a little digging, i found that it is because of the
current shell being closed as the sh script closes. so i used opened a new
shell and then ran it using :
bash
. ~/openoffice4.1_sdk/ubuntu/setsdkenv_unix.sh
now as long as i dont close the current shell using 'exit' i am able to
build the exmples.
.
I just wanted to ask if it is meant like this to always run the
setsdkenv_unix from sdk folder or if opening a new shell and running from
home directory is mandatory?
.
Abhinav

On Thu, Apr 23, 2015 at 10:49 PM, Abhinav Tripathi <ee...@iiti.ac.in>
wrote:

> Thanks!
> I used setsdkenv_unix once but I didnt know it generated any script which
> is to be run.
> .
> I removed and reinstalled everything again and then tried it and
> everything works!
> Thanks again!
> .
> Abhinav
> On 23-Apr-2015 8:17 PM, "Ariel Constenla-Haile" <ar...@apache.org>
> wrote:
>
>> Hello,
>>
>> On Wed, Apr 22, 2015 at 01:01:30AM -0700, Abhinav Tripathi wrote:
>> > Hello!
>> > I downloaded The OpenOffice deb files and Sdk 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 could download it from
>> > the apt-get...
>> > 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 overcome some of these i did :
>> > 1. copied all files from sdk/bin/ to my root folder /bin/ because the
>> error
>> > said /bin/cppumaker : command not found
>>
>> [...]
>>
>> You need to set up the SDK environment, you don't need to copy anything.
>> Please read /opt/openoffice4/sdk/docs/install.html
>>
>> You need to execute /opt/openoffice4/sdk/setsdkenv_unix as a normal
>> user, not root; provide all the information it will ask you. This will
>> generate a script in your home directory that you must source every time
>> you want to build an SDK example. The script takes care of setting the
>> required environment variables, there is no need to copy anything from
>> /opt to your home.
>>
>>
>> Regards
>> --
>> Ariel Constenla-Haile
>> La Plata, Argentina
>>
>

Re: [OO_SDK] [linux] [Makefile] Errors while compiling examples in sdk

Posted by Abhinav Tripathi <ee...@iiti.ac.in>.
Thanks!
I used setsdkenv_unix once but I didnt know it generated any script which
is to be run.
.
I removed and reinstalled everything again and then tried it and everything
works!
Thanks again!
.
Abhinav
On 23-Apr-2015 8:17 PM, "Ariel Constenla-Haile" <ar...@apache.org> wrote:

> Hello,
>
> On Wed, Apr 22, 2015 at 01:01:30AM -0700, Abhinav Tripathi wrote:
> > Hello!
> > I downloaded The OpenOffice deb files and Sdk 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 could download it from
> > the apt-get...
> > 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 overcome some of these i did :
> > 1. copied all files from sdk/bin/ to my root folder /bin/ because the
> error
> > said /bin/cppumaker : command not found
>
> [...]
>
> You need to set up the SDK environment, you don't need to copy anything.
> Please read /opt/openoffice4/sdk/docs/install.html
>
> You need to execute /opt/openoffice4/sdk/setsdkenv_unix as a normal
> user, not root; provide all the information it will ask you. This will
> generate a script in your home directory that you must source every time
> you want to build an SDK example. The script takes care of setting the
> required environment variables, there is no need to copy anything from
> /opt to your home.
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>

Re: [OO_SDK] [linux] [Makefile] Errors while compiling examples in sdk

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hello,

On Wed, Apr 22, 2015 at 01:01:30AM -0700, Abhinav Tripathi wrote:
> Hello!
> I downloaded The OpenOffice deb files and Sdk 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 could download it from
> the apt-get...
> 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 overcome some of these i did :
> 1. copied all files from sdk/bin/ to my root folder /bin/ because the error
> said /bin/cppumaker : command not found

[...]

You need to set up the SDK environment, you don't need to copy anything.
Please read /opt/openoffice4/sdk/docs/install.html

You need to execute /opt/openoffice4/sdk/setsdkenv_unix as a normal
user, not root; provide all the information it will ask you. This will
generate a script in your home directory that you must source every time
you want to build an SDK example. The script takes care of setting the
required environment variables, there is no need to copy anything from
/opt to your home.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina