Build posix sample problem (cmake error)


Andrew Holt
 

Hi,
I'm new to Zephyr, just starting to investigate it.

I suspect I'm either missing something or doing something silly.

When I run the following command in the /home/andrewh/Source/zephyrproject/zephyr folder:

west build -b native_posix samples/hello_world

I get :


-- west build: build configuration:
       source directory: /media/andrewh/SOURCE/Source/zephyrproject/zephyr/samples/hello_world
       build directory: /media/andrewh/SOURCE/Source/zephyrproject/zephyr/build
       BOARD: native_posix (origin: command line)
-- west build: generating a build system
CMake Error: The source directory "" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
ERROR: command exited with status 1: /usr/bin/cmake -B/media/andrewh/SOURCE/Source/zephyrproject/zephyr/build -S/media/andrewh/SOURCE/Source/zephyrproject/zephyr/samples/hello_world -GNinja -DBOARD=native_posix

Any help much appreciated


Carles Cufi
 

Hi Andrew,

 

Can you please make sure there is not a stale `build/` folder in your zephyrproject/zephyr folder?

Also, can you make sure you are using west 0.6.0 or higher? Type west –version

 

Carles

 

From: devel@... <devel@...> On Behalf Of Andrew Holt via Lists.Zephyrproject.Org
Sent: 28 August 2019 11:26
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] Build posix sample problem (cmake error)

 

Hi,
I'm new to Zephyr, just starting to investigate it.

I suspect I'm either missing something or doing something silly.

When I run the following command in the /home/andrewh/Source/zephyrproject/zephyr folder:

west build -b native_posix samples/hello_world

I get :

-- west build: build configuration:

       source directory: /media/andrewh/SOURCE/Source/zephyrproject/zephyr/samples/hello_world

       build directory: /media/andrewh/SOURCE/Source/zephyrproject/zephyr/build

       BOARD: native_posix (origin: command line)

-- west build: generating a build system

CMake Error: The source directory "" does not exist.

Specify --help for usage, or press the help button on the CMake GUI.

ERROR: command exited with status 1: /usr/bin/cmake -B/media/andrewh/SOURCE/Source/zephyrproject/zephyr/build -S/media/andrewh/SOURCE/Source/zephyrproject/zephyr/samples/hello_world -GNinja -DBOARD=native_posix

Any help much appreciated