View Single Post
  #1   (View Single Post)  
Old 17th September 2017
puffymon puffymon is offline
Real Name: Leonid
Port Guard
 
Join Date: Apr 2017
Location: Earth
Posts: 37
Default Compiler doesn't see headers in /usr/local/include

Hi. If I'm trying to compile anything manually and program includes headers from /usr/local/include, compilers (clang and gcc) print that files are not found and I have to manually edit these programs and change #include <file.h> to #include "/full/path/to/file.h". That problem appeared when I made a fresh install of OpenBSD snapshot.
Example compilations:
Code:
$ gcc test.c             
test.c:1:19: error: check.h: No such file or directory
$ cat test.c             
#include <check.h>

int main()
{
        return 0;
}
$ ls /usr/local/include/check*                                                                                                                                                                                                 
/usr/local/include/check.h           /usr/local/include/check_stdint.h
$ cmake ..
-- The C compiler identification is Clang 4.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/uTox/build
$ make
Scanning dependencies of target utoxAV
[  1%] Building C object CMakeFiles/utoxAV.dir/src/av/utox_av.c.o
In file included from /tmp/uTox/src/av/utox_av.c:2:
/tmp/uTox/src/av/utox_av.h:5:10: fatal error: 'tox/toxav.h' file not found
#include <tox/toxav.h>
         ^~~~~~~~~~~~~
1 error generated.
*** Error 1 in . (CMakeFiles/utoxAV.dir/build.make:63 'CMakeFiles/utoxAV.dir/src/av/utox_av.c.o': /usr/bin/cc  -I/usr/include/freetype2  -Wa...)
*** Error 1 in . (CMakeFiles/Makefile2:68 'CMakeFiles/utoxAV.dir/all')
*** Error 1 in /tmp/uTox/build (Makefile:130 'all')
$ ls /usr/local/include/tox/
tox.h            toxav.h          toxdns.h         toxencryptsave.h
$ uname -a
OpenBSD puffy.pc 6.2 GENERIC.MP#98 amd64
$
Reply With Quote