# cmake barfing on i386 only?

**URL:** https://discourse.cmake.org/t/cmake-barfing-on-i386-only/6294
**Category:** Code
**Created:** [August 18, 2022, 2:27pm UTC](https://discourse.cmake.org/t/cmake-barfing-on-i386-only/6294 "2022-08-18T14:27:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![FGasper](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fgasper/32/2690_2.png) [@FGasper](https://discourse.cmake.org/u/FGasper)
#### Post date: [August 18, 2022, 2:27pm UTC](https://discourse.cmake.org/t/cmake-barfing-on-i386-only/6294/1 "2022-08-18T14:27:45Z")

</div>

I’m trying to get [libnfs](https://github.com/sahlberg/libnfs) to compile on i386, but it keeps failing with errors like this:

```auto
CMake Error at lib/CMakeLists.txt:19 (target_link_libraries):
  Target "nfs_rquota" of type OBJECT_LIBRARY may not be linked into another
  target. One may link only to STATIC or SHARED libraries, or to executables
  with the ENABLE_EXPORTS property set.

```

To reproduce:

- `docker run --rm --privileged multiarch/qemu-user-static --reset -p yes`
- `docker run --rm --interactive i386/ubuntu bash -c 'apt update; apt install -y git gcc cmake make; git clone https://github.com/sahlberg/libnfs; cd libnfs; mkdir build; cd build; cmake ..'`

If you change `i386` in the above to `arm32v7` then it’ll work.

Any ideas for what’s going on here would be appreciated—thank you!

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [August 18, 2022, 4:43pm UTC](https://discourse.cmake.org/t/cmake-barfing-on-i386-only/6294/2 "2022-08-18T16:43:45Z")

</div>

It sounds like there’s an old CMake in the i386 container. Linking to OBJECT libraries needs at least CMake 3.12.
