A host PC with a pre-built cross toolchain for ARM target. I try to build a project from source, the build process stopped due to an error, when code tried to build pppd-2.4.1 module, here is relevant part of log:

... ... ...
if [ -f pppd/Makefile.cyt ]; then \
    make -C pppd -f Makefile.cyt; \
else \
    make -C pppd; \
make[3]: Entering directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1'
make -C pppd
make[4]: Entering directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd'
/opt/emlix/pnx8181/bin/arm-linux-gnueabi-gcc -O2 -pipe -Wall -g -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -I../include '-DDESTDIR="/usr/local"' -DCHAPMS=1 -DMPPE=1 -DHAS_SHADOW -DHAVE_CRYPT_H=1 -DUSE_CRYPT=1 -DHAVE_MULTILINK -DUSE_TDB=1 -DPLUGIN -DMAXOCTETS   -c -o utils.o utils.c
utils.c:79:21: error: cy_conf.h: No such file or directory
<builtin>: recipe for target 'utils.o' failed
make[4]: *** [utils.o] Error 1
make[4]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1/pppd'
Makefile.cyt:18: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source/pkgs/pppd-2.4.1'
/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/Rules.mk:74: recipe for target '_subdir_pppd' failed
make[2]: *** [_subdir_pppd] Error 2
make[2]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router/open_source'
/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/Rules.mk:74: recipe for target '_subdir_open_source' failed
make[1]: *** [_subdir_open_source] Error 2
make[1]: Leaving directory '/home/vestjo/test/payton_1.4.1.SR1_gpl/payton/src/router'
Rules.mk:74: recipe for target '_subdir_router' failed
make: *** [_subdir_router] Error 2

The compiler can't find header file, 'cy_conf.h'. The header file path: $(SRCBASE)/include/cy_conf.h. Project makefiles have complex structure, multi-level recursive makefiles.

Project top-most directory contains no configuration file, although some modules in subdirectories have config files inside. Project should be built by executing the Makefile in the main(top-most) directory. It doesn't require run these config files prior build the code. How to make the gcc compiler find the header file?

Edit: same error when run 'make' within /pppd directory(down-level folder).

pppd$ make
utils.c:79:21: fatal error: cy_conf.h: No such file or directory
 #include <cy_conf.h>
compilation terminated.
<builtin>: recipe for target 'utils.o' failed
  • Try to go in the directory pppd/ and run make. The flag 'I../include' should point to the header file. Is this file there? Aug 5, 2019 at 11:27
  • Same error when run 'make' within /pppd directory.
    – minto
    Aug 5, 2019 at 12:14
  • Is cy_conf.h in the sources (run find . -name 'cy_conf' in the top directory of the sources)?? Aug 5, 2019 at 19:03
  • 'cy_conf.h' file found in two places: ./router/open_source/pkgs/net-snmp-5.7.3/include/net-snmp/cy_conf.h and ./router/open_source/include/cy_conf.h, but not in the top directory of the sources, as specified in top Makefile: export CY_CONF_H := $(SRCBASE)/include/cy_conf.h. There is no 'include' folder in top dir.
    – minto
    Aug 5, 2019 at 19:50
  • Ok. Are you using a release tarball of the sources or did you clone a development repository? (Github/Gitlab...)?? Aug 6, 2019 at 5:26

1 Answer 1


ppp-2.4.1 sources can be downloaded here: https://download.samba.org/pub/ppp/ the build instructions are classic: first you configure the build by running the configure script at the top of the source directory.

If the configuration does not work, it can be helpful to know that the preprocessor is responsible for finding includes. export CPPFLAGS=-I${SRCBASE}/include can help before running the configure script

In order to cross compile this package, you have to adapt your compiler at compile time:

CC=<name of>-<your>-<tuple here>-gcc make
  • where should be added this export CPPFLAGS=-I${SRCBASE}/include, in project top Makefile or toolchain.mk?
    – minto
    Aug 5, 2019 at 12:50
  • you should run this before you run the configure script (in the top directory of the sources. Aug 5, 2019 at 19:01
  • There is no .configure script in the top directory of sources. Does this export CPPFLAGS shouldn't be specified globally in the top Makefile or toolchain.mk files?
    – minto
    Aug 5, 2019 at 20:07
  • Yes, but sometimes you have to provide these flags yourself. How do you run the build and configure it? Aug 6, 2019 at 5:24
  • I tried run command export CPPFLAGS=-I${SRCBASE}/include from the top directory top of the sources. Then 'make', but the same result. I followed build instructions that indicate untar package, $ cd to /src folder, $ make, $ make install.
    – minto
    Aug 6, 2019 at 19:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .