1

Attempting to cross-compile with Cmake using a toolchain file I've written for a mips processor. At 22% I get this error:

/usr/local/mipsisa32r2el/r23/bin/ld: cannot find -luuid

Is it LD that is missing a library? Is it possible to rectify when using a mips gcc-compiler?

Kagemand Andersen
  • 1,470
  • 2
  • 16
  • 30
  • Error message means that linker cannot find `uuid` library which is requested by some library/executable. Note, that as you perform *cross-compiling* (and use linker for target platform), you need the **library built for the target platform**. – Tsyvarev Feb 19 '18 at 16:44
  • @Tsyvarev so I need to compile that library with my mips-gcc compiler? How do I go about that? Already built OpenSSL and Curl, but not sure how the uuid library works. Can't find any repository for it. Sorry if these are stupid questions. Never cross-compiled anything before this. – Kagemand Andersen Feb 20 '18 at 08:06
  • The second reference from googling for uuid sources: https://sourceforge.net/p/libuuid/code/ci/master/tree/. Actually, uuid is a part of util-linux, so you may take it from there. – Tsyvarev Feb 20 '18 at 08:19
  • @Tsyvarev Ah, didn't know it was part of util-linux. Thanks! – Kagemand Andersen Feb 20 '18 at 08:51

1 Answers1

0

Did as Tsyvarev said.

git clone https://github.com/karelzak/util-linux.git

Then executed the the autogen.sh to create the configure files.

Finally, ./configure --host=x86_64-unknown-linux-gnu --prefix=$INSTALL_DIR CC=$MIPS_GCC

make
make install

And then copied the lib files to the mips gcc library.

Kagemand Andersen
  • 1,470
  • 2
  • 16
  • 30