Bug 203437

Summary: devel/imake doesn't work with clang, again
Product: Ports & Packages Reporter: lampa
Component: Individual Port(s)Assignee: Greg Lehey <grog>
Status: New ---    
Severity: Affects Many People CC: grog, tablosazi.farahan
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description lampa 2015-09-29 15:43:59 UTC
Current imake port doesn't work with clang (FreeBSD-10+). BUILD_DEPENDS requires tradcpp, but imake will always use cc:

imake -v  -DUseInstalled -I/usr/local/lib/X11/config
cc -I. -Uunix -D__amd64__ -D__amd64__ -traditional -DUseInstalled -I/usr/local/lib/X11/config -E -v Imakefile.c
...

imake Makefile contains
CPP_PROGRAM = tradcpp
but this is ignored, since USE_CC_E has greater priority and it is set, see

work/imake-1.0.7/imake.c (287)
#ifndef CROSSCOMPILE
# ifdef USE_CC_E
#  ifndef DEFAULT_CC
#   define DEFAULT_CC "cc"
#  endi
# else
#  ifndef DEFAULT_CPP
#   ifdef CPP_PROGRAM
#    define DEFAULT_CPP CPP_PROGRAM
#   else
#    define DEFAULT_CPP "/lib/cpp"
#   endif
#  endif
# endif
#endif


work/imake-1.0.7/imakemdep.h  (304)
#   if defined(__FreeBSD__)  || defined(__NetBSD__) || defined(__OpenBSD__) || d
efined(__DragonFly__)
#    define USE_CC_E
#   endif
...
#   if defined(__GNUC__) && !defined(USE_CC_E)
#    define USE_CC_E
#    ifndef DEFAULT_CC
#     define DEFAULT_CC "gcc"
#    endif
#   endif

To get tradcpp I had to remove both these tests. Proper solution is probably to set DEFAULT_CC=tradcpp in configure or make invocation. It seems that ac_cv_path_RAWCPP=tradcpp in port Makefile is ignored.
Comment 1 Greg Lehey freebsd_committer 2015-12-09 23:44:44 UTC
Could you please supply a working patch?
Comment 2 vali gholami 2017-12-17 07:13:16 UTC
MARKED AS SPAM
Comment 3 lampa 2019-10-09 11:27:01 UTC
Still not fixed in 1.0.8 version.