Bug 396475 - [PATCH] valgrind OS-X build: config.h not found
Summary: [PATCH] valgrind OS-X build: config.h not found
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.14 SVN
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: ---
Assignee: Rhys Kidd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-13 14:50 UTC by Rob Boehne
Modified: 2018-08-19 18:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Add -I$(top_builddir) to the special rule for fixup_macho_loadcmds.c (418 bytes, patch)
2018-07-13 14:50 UTC, Rob Boehne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Boehne 2018-07-13 14:50:22 UTC
Created attachment 113917 [details]
Add -I$(top_builddir) to the special rule for fixup_macho_loadcmds.c

Under OS X, the git sources as of July 13, 2018 can't be build outside the source directory.  This is because and include path to the "build" directory isn't specified in the special rule for one file.


Making all in coregrind
(cd m_mach && mig /usr/include/mach/mach_vm.defs /usr/include/mach/task.defs /usr/include/mach/thread_act.defs /usr/include/mach/vm_map.defs)
gcc -I../../../../valgrind -I../../../../valgrind -I../../../../valgrind/include -I../include -I../../../../valgrind/VEX/pub -I../VEX/pub -DVGA_amd64=1 -DVGO_darwin=1 -DVGP_amd64_darwin=1 -DVGPV_amd64_darwin_vanilla=1  -I../../../../valgrind/coregrind -DVG_LIBDIR="\"/opt/valgrind-3.14.GIT/lib/valgrind"\" -DVG_PLATFORM="\"amd64-darwin\"" -g -Wall -o fixup_macho_loadcmds ../../../../valgrind/coregrind/fixup_macho_loadcmds.c
../../../../valgrind/coregrind/fixup_macho_loadcmds.c:121:10: fatal error: 'config.h' file not found
#include "config.h"
         ^
1 error generated.
gnumake[2]: *** [fixup_macho_loadcmds] Error 1
gnumake[1]: *** [all-recursive] Error 1
gnumake: *** [all] Error 2

Patch attached.
Comment 1 Rhys Kidd 2018-08-19 18:38:56 UTC
Thanks Rob for the report and the patch. Included in Valgrind Git master.