# Hello...I have been using cmake for sometime but now I am building more/ELDK

**URL:** https://discourse.cmake.org/t/hello-i-have-been-using-cmake-for-sometime-but-now-i-am-building-more-eldk/14088
**Category:** Usage
**Tags:** os:linux
**Created:** [May 13, 2025, 11:27pm UTC](https://discourse.cmake.org/t/hello-i-have-been-using-cmake-for-sometime-but-now-i-am-building-more-eldk/14088 "2025-05-13T23:27:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![For\_Ward](https://discourse.cmake.org/user_avatar/discourse.cmake.org/for_ward/32/5564_2.png) [@For\_Ward](https://discourse.cmake.org/u/For_Ward)
#### Post date: [May 13, 2025, 11:27pm UTC](https://discourse.cmake.org/t/hello-i-have-been-using-cmake-for-sometime-but-now-i-am-building-more-eldk/14088/1 "2025-05-13T23:27:50Z")

</div>

Hello,

I am using cmake but ELDK is not available it seems. I am trying to cross compile via cmake from WSL2 Debian Bookworm to an armhf machine. It is a single core machine that needs the build.

So far, this is what I have going…

```auto
cmake_minimum_required(VERSION 3.25)
project(BeagleCPP)

# find_package(PTHREADS REQUIRED)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_SYSTEM_NAME Linux)

set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

set(CMAKE_FIND_ROOT_PATH ~/BeagleCPP/)

include_directories(include)

file(GLOB SOURCES "src/*.cpp")

add_executable(BeagleCPP ${SOURCES})

```

But here, [https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html](https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html) , is where I find that ELDK is needed to port to armhf architecture type machines.

32-bit and older but I wanted to test on this machine via cross\_compilation before proceeding to arm64/aarch64.

I am not quite sure I understand the basis for having ELDK in the docs. when it is not available…

Or…I am missing the boat. Either way, I have tried with a cross-compiler listed from a Debian repo to no avail.

Seth

P.S. Please send some guidance or ideas.

---

<div class="post-metadata">

### Author: ![hsattler](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/h/59ef9b/32.png) [@hsattler](https://discourse.cmake.org/u/hsattler)
#### Post date: [May 14, 2025, 8:20am UTC](https://discourse.cmake.org/t/hello-i-have-been-using-cmake-for-sometime-but-now-i-am-building-more-eldk/14088/2 "2025-05-14T08:20:21Z")

</div>

That’s the bad thing about examples: some people take them literally.

But read all words of the sentence:  
" **Assuming** your target environment is installed under `/opt/eldk/ppc_74xx` […]"

You obviously use another target environment.

---

<div class="post-metadata">

### Author: ![For\_Ward](https://discourse.cmake.org/user_avatar/discourse.cmake.org/for_ward/32/5564_2.png) [@For\_Ward](https://discourse.cmake.org/u/For_Ward)
#### Post date: [May 15, 2025, 1:48am UTC](https://discourse.cmake.org/t/hello-i-have-been-using-cmake-for-sometime-but-now-i-am-building-more-eldk/14088/3 "2025-05-15T01:48:01Z")

</div>

`build CMakeLists.txt include src` are the files in my repo I am using…

- `build`: of course is the build dir.
- `CMakeLists.txt`: is of course my build file.
- `include`: are all my .h files.
- `src`: is all the .cpp files I will be cross\_compiling.

I understand about the example now. Since the inception of the build with `cmake`, I have learned some new ideas and build rules.

```auto
include_directories(include)

file(GLOB SOURCES "src/*.cpp")

add_executable(BeagleCPP ${SOURCES})

```

At least, does this work with the files in `src` and `include` for now?

It would build to 100% and then error out at the last second of the build compilation.

Also, would I need to grab a copy of debian (armhf) and then `mount` the extracted .iso file to `/tmp/` or '/mnt/` and go from that point forward. I am seemingly having a difficult time now trying to summarize so far.

The build is still a WIP and it would be easier on me if I just use the armhf machine but that is not the way I should do it. I say that because cross\_compiling is faster and once I can `rinse and repeat`, it would be an easy task.

Now, with all that typed out, I took out:

```auto
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

```

I also added the cross\_compiler:

```auto
set(CMAKE_CROSS_COMPILER /usr/bin/arm-linux-gnueabihf-)

```

Seth

---

<div class="post-metadata">

### Author: ![For\_Ward](https://discourse.cmake.org/user_avatar/discourse.cmake.org/for_ward/32/5564_2.png) [@For\_Ward](https://discourse.cmake.org/u/For_Ward)
#### Post date: [May 17, 2025, 9:14am UTC](https://discourse.cmake.org/t/hello-i-have-been-using-cmake-for-sometime-but-now-i-am-building-more-eldk/14088/4 "2025-05-17T09:14:17Z")

</div>

I think my query is with the cross\_compiler now and not cmake. Thank you for the time on this site so far.
