Bug 203437 - devel/imake doesn't work with clang, again
Summary: devel/imake doesn't work with clang, again
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Graham Perrin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-29 15:43 UTC by lampa
Modified: 2023-06-25 10:20 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 freebsd_triage 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.
Comment 4 Rene Ladan freebsd_committer freebsd_triage 2021-09-06 21:21:56 UTC
Maintainer reset.
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2022-03-26 15:16:17 UTC
Still an issue?