[MacPorts] #64175: fnc is not using the right compiler or arch flags

MacPorts noreply at macports.org
Fri Dec 10 09:15:52 UTC 2021


#64175: fnc is not using the right compiler or arch flags
-------------------------+----------------------
  Reporter:  ryandesign  |      Owner:  mcjsk
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.7.1
Resolution:              |   Keywords:
      Port:  fnc         |
-------------------------+----------------------

Comment (by ryandesign):

 To clarify what's meant by "right compiler and flags", look at a
 [https://build.macports.org/builders/ports-
 12_arm64-builder/builds/31442/steps/install-port/logs/stdio build log]:

 {{{
 cc  -Wall -Werror -Wno-sign-compare -pedantic -std=c99 -DNDEBUG=1
 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0
 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS
 -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK
 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION
 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA
 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4
 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4
 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_HAVE_ZLIB -DSQLITE_INTROSPECTION_PRAGMAS
 -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_TRUSTED_SCHEMA=0 -c lib/sqlite3.c -o
 lib/sqlite3.o
 cc  -Wall -Werror -Wsign-compare -pedantic -std=c99 -c lib/libfossil.c -o
 lib/libfossil.o
 cc  -Wall -Werror -Wsign-compare -pedantic -std=c99 -I./lib -I./include
 -I/usr/include/ncursesw -D_XOPEN_SOURCE_EXTENDED -DVERSION=0.6 -c
 src/fnc.c -o src/fnc.o
 cc -o src/fnc src/fnc.o lib/libfossil.o lib/sqlite3.o  -lm -lutil -lz
 -lpthread -fPIC -lncurses -lpanel -liconv
 }}}

 * It is using `cc` when it should be using whatever MacPorts has set the
 variable `${configure.cc}` to
 * It should be using the flags MacPorts set in `${configure.cflags}`,
 `${configure.cppflags}` and `${configure.ldflags}`

 I also see a `-I/usr/include/ncursesw` in there which is wrong since the
 port declares a dependency on the ncurses port so clearly we're wanting to
 use MacPorts ncurses, not any that might be provided by the OS. MacPorts
 cppflags come preset to `-I${prefix}/include` so by using those the right
 flag will be there. You may still need to take additional measures to
 remove the incorrect flag, depending on how it's getting into the build.
 (Read the Makefile to find out.)

 When you fix this, since the build will then be using different flags
 (such as different optimization flags, which will result in a different
 executable being produced than before), the port's revision should be
 increased.

-- 
Ticket URL: <https://trac.macports.org/ticket/64175#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list