# elf32 dependencies get packed

**URL:** https://discourse.cmake.org/t/elf32-dependencies-get-packed/3051
**Category:** Usage
**Tags:** os:linux
**Created:** [March 31, 2021, 3:38am UTC](https://discourse.cmake.org/t/elf32-dependencies-get-packed/3051 "2021-03-31T03:38:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![oscarh](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/o/aca169/32.png) [@oscarh](https://discourse.cmake.org/u/oscarh)
#### Post date: [March 31, 2021, 3:38am UTC](https://discourse.cmake.org/t/elf32-dependencies-get-packed/3051/1 "2021-03-31T03:38:30Z")

</div>

I’m using CMake 3.20.

I have a 64-bit Linux application built by running CMake scripts. After I ran CPack to create a binary package, I found 32-bit system libraries were pulled into the package, while it should pull 64-bit libraries. For example, /lib/libstdc++.so.6.0.19 was copied into the package, while it should have copied /lib64/libstdc++.so.6.0.19. Here is my code for creating the package:  
#install rules:  
install(TARGETS flashtechSim RUNTIME DESTINATION bin)  
install(CODE [[  
file(GET\_RUNTIME\_DEPENDENCIES  
RESOLVED\_DEPENDENCIES\_VAR dpdsList  
UNRESOLVED\_DEPENDENCIES\_VAR unrslved  
EXECUTABLES $\<TARGET\_FILE:flashtechSim\>)  
file(INSTALL ${dpdsList} DESTINATION ${CMAKE\_INSTALL\_PREFIX}/lib FOLLOW\_SYMLINK\_CHAIN)  
]]  
)

#Creating distribution package:  
include(CPack)

---

<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: [March 31, 2021, 3:47pm UTC](https://discourse.cmake.org/t/elf32-dependencies-get-packed/3051/2 "2021-03-31T15:47:46Z")

</div>

There was mention elsewhere (I thought it was an issue, but it’s probably elsewhere on Discourse) that we probably need to check arch flags on libraries we find and skip those that don’t make sense. We should definitely make an issue to track it though.

Cc: @kyle.edwards

---

<div class="post-metadata">

### Author: ![ferdnyc](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ferdnyc/32/267_2.png) [@ferdnyc](https://discourse.cmake.org/u/ferdnyc)
#### Post date: [April 2, 2021, 11:17pm UTC](https://discourse.cmake.org/t/elf32-dependencies-get-packed/3051/3 "2021-04-02T23:17:35Z")

</div>

That previous convo was here: [file(GET\_RUNTIME\_DEPENDENCIES) issues](https://discourse.cmake.org/t/file-get-runtime-dependencies-issues/2574)
