Bug 1543787

Summary: hsakmt: Does not build with Fedora build flags
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: hsakmtAssignee: Oded Gabbay <oded.gabbay>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: oded.gabbay, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hsakmt-1.0.6-4.20171026git172d101.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-14 20:53:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1539083    

Description Florian Weimer 2018-02-09 10:19:00 UTC
hsakmt-1.0.6-2.20171026git172d101.fc28 builds /usr/lib64/libhsakmt.so.1.0.6 without the Fedora build flags.  CFLAGS injection fails:

/usr/bin/cc -Dhsakmt_EXPORTS -I/builddir/build/BUILD/ROCT-Thunk-Interface-172d101e103ae1dd6e1ed52aa708b65ba63e386d/include -I/builddir/build/BUILD/ROCT-Thunk-Interface-172d101e103ae1dd6e1ed52aa708b65ba63e386d/src  -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/hsakmt.dir/src/globals.c.o   -c /builddir/build/BUILD/ROCT-Thunk-Interface-172d101e103ae1dd6e1ed52aa708b65ba63e386d/src/globals.c

LDFLAGS injection does not work either:

/usr/bin/cc -fPIC -fPIC -W -Wall -Wextra -Werror -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden -O2 -O2 -g -DNDEBUG -Wl,--version-script=/builddir/build/BUILD/ROCT-Thunk-Interface-172d101e103ae1dd6e1ed52aa708b65ba63e386d/src/libhsakmt.ver -Wl,-soname=libhsakmt.so.$(VERSION_MAJOR) -Wl,-z,nodelete -shared -Wl,-soname,libhsakmt.so.1 -o libhsakmt.so.1.0.6 CMakeFiles/hsakmt.dir/src/debug.c.o CMakeFiles/hsakmt.dir/src/events.c.o CMakeFiles/hsakmt.dir/src/fmm.c.o CMakeFiles/hsakmt.dir/src/globals.c.o CMakeFiles/hsakmt.dir/src/libhsakmt.c.o CMakeFiles/hsakmt.dir/src/memory.c.o CMakeFiles/hsakmt.dir/src/openclose.c.o CMakeFiles/hsakmt.dir/src/perfctr.c.o CMakeFiles/hsakmt.dir/src/pmc_table.c.o CMakeFiles/hsakmt.dir/src/queues.c.o CMakeFiles/hsakmt.dir/src/time.c.o CMakeFiles/hsakmt.dir/src/topology.c.o CMakeFiles/hsakmt.dir/src/version.c.o -lpthread -lrt -lpci 

I assume this is because CMAKE_C_FLAGS and CMAKE_SHARED_LINKER_FLAGS are overridden in CMakeLists.txt.

Comment 1 Tom Stellard 2018-02-14 20:53:44 UTC
Fixed in hsakmt-1.0.6-4.20171026git172d101.fc28.