rpm error with clang

Was trying to make rpm using clang and it gives following msg. gcc works fine.

One work around will be not building the debug rpm, which I am not so keen to do.

Sometimes while using clang in development, resultant binaries can not be debugged well with gdb like It can not find the file etc.

clang is 3.2 released version.

  • /usr/lib/rpm/find-debuginfo.sh --strict-build-id /root/rpmbuild/BUILD/tog-pegasus-2.13.0
    extracting debug info from /root/rpmbuild/BUILDROOT/tog-pegasus-2.13.0-1.x86_64/usr/lib64/libpegcompiler.so.1
    *** ERROR: No build ID note found in /root/rpmbuild/BUILDROOT/tog-pegasus-2.13.0-1.x86_64/usr/lib64/libpegcompiler.so.1
    error: Bad exit status from /var/tmp/rpm-tmp.edPlm1 (%install)

am I doing something wrong?

Currently working around by removing rpm

But work around does not make the debug rpm.

You have to disable --strict-build-id in rpm.
(this patch is fsck'd up for a std patch but you get the idea. :slight_smile: )

--- //usr/lib/rpm/find-debuginfo.sh 2013-09-09 08:11:23.000000000 -0400
+++ /home/so/find-debuginfo.sh 2014-01-01 12:32:25.360449406 -0500
@@ -53,6 +53,9 @@
   case "$1" in
+if [ ${CC} = "clang" ]; then
+ strict=false