2

I am using a device that is running Yoco Linux on a 32 Bit architecture. It does not provide a package manager or a compiler thus not allowing me to compile on it. Instead I use a Ubuntu Virtual Machine where I compile what I need, copy it to the device and install there.

That what I did for example for Python3.4 - it was as easy as:

./configure
make

On the Ubuntu Virtual Machine and

make install

on the device running Yocto.

But now I am facing a minor problem with unixODBC. ./configure and make are completed without any problems. What I did not know is that I also need a gcc compiler for make install and therefore not making it possible to use it on the device. Naivly I thought I could just copy the libraries completly compiled on Ubuntu to the deivce but this didn't work. All configuration is not done.

My question is: is there an argument for make or any kind of other option to build all I need on Ubuntu, copy it to the device and start the configuration routine that is build into unixODBCs installation?

I took a look around through the Makefile hoping to find a clue but without luck. It also is hard to grasp what kind of configuration is done after compilation was successful.

1

When installing programs from the source you can often use the DESTDIR flag to achieve this.

  1. Create a new directory: mkdir /tmp/uodbcinst
  2. Install: make DESTDIR=/tmp/uodbcinst/ install
  3. Archive the result tar -cpzf ~/uodbcinst.tar.gz -C /tmp/uodbcinst .
  4. Extract the result on the other system tar -C / -xf uodbcinst.tar.gz

Disclaimer: I haven't tested these commands, please double check the syntax. Extracting a tarball into the root directory is very dangerous.

You may also want to consider adjusting the --sysconfdir option when running ./configure so that the resulting program looks in the /etc/ folder for configuration files instead of /usr/local/etc.

This method is similar to how distribution maintainers create the payloads for package managers. See the Arch Linux example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.