#64559 closed defect (fixed)
ncplot @4.9.12: Use the right flags and compiler
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | mf2k (Frank Schima) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | Cc: | ||
Port: | ncplot |
Description
The ncplot build is not using the cflags, cppflags, ldflags MacPorts wants it to. For example:
/usr/bin/clang++ -arch arm64 -Wall -g -O2 -I/opt/X11/include -DPNG -Wno-write-strings -Wno-overflow -c ncplot.c clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
-Os
is not present but-O2
is-I/opt/local/include
is not present but-I/opt/X11/include
(which we don't want) is-stdlib=libc++
is not present which we would want when compiling C++ software but in fact this port is erroneously using the C++ compiler to compile C code. That's coming from the portfile:
CC="${configure.cxx} [get_canonical_archflags cxx]"
The portfile could be simplified, and many of these problems could be corrected, by letting the makefile portgroup handle these details for you (though you'll probably still need to manually address the unwanted -I/opt/X11/include
and -L/opt/X11/lib
flags).
Change History (4)
comment:1 Changed 3 years ago by mf2k (Frank Schima)
comment:2 Changed 3 years ago by mf2k (Frank Schima)
comment:3 Changed 3 years ago by mf2k (Frank Schima)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 3 years ago by mf2k (Frank Schima)
I worked with upstream to fix most of the build issues. They acknowledge more work needs to be done (Converting more files from .c to .cc).
Note: See
TracTickets for help on using
tickets.
Using cc instead of cxx causes a build error:
Apparently algorithm is in C++ and not C.