Opened 13 months ago

Last modified 13 months ago

#68317 assigned defect

lua51-lpeg @1.1.0: builds with the wrong compiler and flags in build phase; rebuilds with right compiler and flags in destroot phase

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: judaew (Vadym-Valdis Yudaiev)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: lua-lpeg

Description

Build phase part of log of building lua51-lpeg:

gcc -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith -Wshadow -Wredundant-decls -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -Wc++-compat  -O2 -DNDEBUG -std=c99 -I/opt/local/include/lua5.1 -fPIC   -c -o lpvm.o lpvm.c
gcc -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith -Wshadow -Wredundant-decls -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -Wc++-compat  -O2 -DNDEBUG -std=c99 -I/opt/local/include/lua5.1 -fPIC   -c -o lpcap.o lpcap.c
gcc -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith -Wshadow -Wredundant-decls -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -Wc++-compat  -O2 -DNDEBUG -std=c99 -I/opt/local/include/lua5.1 -fPIC   -c -o lptree.o lptree.c
gcc -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith -Wshadow -Wredundant-decls -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -Wc++-compat  -O2 -DNDEBUG -std=c99 -I/opt/local/include/lua5.1 -fPIC   -c -o lpcode.o lpcode.c
gcc -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith -Wshadow -Wredundant-decls -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -Wc++-compat  -O2 -DNDEBUG -std=c99 -I/opt/local/include/lua5.1 -fPIC   -c -o lpprint.o lpprint.c
gcc -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith -Wshadow -Wredundant-decls -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -Wc++-compat  -O2 -DNDEBUG -std=c99 -I/opt/local/include/lua5.1 -fPIC   -c -o lpcset.o lpcset.c
env gcc -dynamiclib -Wl,-undefined,dynamic_lookup,-install_name,/opt/local/lib/lua/5.1/lpeg.dylib lpvm.o lpcap.o lptree.o lpcode.o lpprint.o lpcset.o -o lpeg.dylib

This part isn't UsingTheRightCompiler or flags.

Log of destroot phase:

/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lua_lua-lpeg/lua51-lpeg/work/compwrap/cc/usr/bin/clang -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -fPIC -I/opt/local/libexec/lua51/include -c lpcap.c -o lpcap.o
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lua_lua-lpeg/lua51-lpeg/work/compwrap/cc/usr/bin/clang -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -fPIC -I/opt/local/libexec/lua51/include -c lpcode.c -o lpcode.o
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lua_lua-lpeg/lua51-lpeg/work/compwrap/cc/usr/bin/clang -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -fPIC -I/opt/local/libexec/lua51/include -c lpcset.c -o lpcset.o
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lua_lua-lpeg/lua51-lpeg/work/compwrap/cc/usr/bin/clang -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -fPIC -I/opt/local/libexec/lua51/include -c lpprint.c -o lpprint.o
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lua_lua-lpeg/lua51-lpeg/work/compwrap/cc/usr/bin/clang -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -fPIC -I/opt/local/libexec/lua51/include -c lptree.c -o lptree.o
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lua_lua-lpeg/lua51-lpeg/work/compwrap/cc/usr/bin/clang -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -fPIC -I/opt/local/libexec/lua51/include -c lpvm.c -o lpvm.o
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lua_lua-lpeg/lua51-lpeg/work/compwrap/cc/usr/bin/clang -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -bundle -undefined dynamic_lookup -all_load -o lpeg.so lpcap.o lpcode.o lpcset.o lpprint.o lptree.o lpvm.o
No existing manifest. Attempting to rebuild...
lpeg 1.1.0-1 is now installed in /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lua_lua-lpeg/lua51-lpeg/work/destroot/opt/local (license: MIT/X11)

This part is using the right compiler and flags but it appears to be rebuilding what was already built in the build phase, except that the rebuild is building jpeg.so instead of jpeg.dylib. The entire correct build should happen in the build phase and no building should happen in the destroot phase.

Change History (1)

comment:1 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

Of particular concern is the post-build block in the Portfile which manually invokes make to build lpeg.dylib; this needs to pass along all the necessary environment variables. It can be easier to extend the makefile so that it builds things for you automatically without needing to invoke make again separately.

Note: See TracTickets for help on using tickets.