[DTrace-devel] fail to build rpm package for dtrace-uitls

Tomas Jedlicka tomas.jedlicka at oracle.com
Mon Apr 23 05:18:48 PDT 2018


Oh, I see. We will fix the readme. Thanks for bringing this up.

The problem you see is caused by missing "kernel-uek-devel" package
installed with same version as spec file requires. This is a problem as
UEK5 has not been released yet and thus there is no such package
available yet (unless you build your own kernel-uek RPMs from github).

You need to bootstrap the build and that is a bit tricky at this moment
as without dtrace-utils-devel you don't have DTrace headers installed.
At the same time you are trying to build dtrace-utils-devel.

I am doing this boostrap procedure:

     - Get your kernel (UEK5 or generic 4.14. with our patches) built 
and booted into.
     - Install by hand DTrace headers from 
<kernel>/include/uapi/linux/dtrace/* to the /usr/include/linux/dtrace/*
     - Use rpmbuild with the "build_local 1" define. This should pick 
headers from system location just fine

If you hit problems with dtrace_kernels (other kernel-uek-devel packages 
required to
produce translators) then you should start with reducing value of RPM 
macro dtrace_kernels
to only one you are currently running. Values of this macro are used to 
search for installed kernel
devel sources in /lib/modules/<......>/build or /usr/src/kernels/<.....>.

Sorry for extra complexity. We are trying to simplify this as much as 
possible but it is
not easy if we are not part of the upstream kernel tree.

I hope it makes things bit more clear. If not then do not hesitate to 
ask more questions.

Tomas

On 04/23/2018 01:14 PM, Fred Liu wrote:
> Tomas,
>
> That is exactly what I reference. BTW, there is typo in that page:
>
> git archive -o ~/rpmbuild/SOURCE/dtrace-utils-1.0.0.tar.bz2
> --prefix=dtrace-utils-1.0.0/ 1.0-branch
>
> The correct one should be(adding the missing 'S'):
> git archive -o ~/rpmbuild/SOURCES/dtrace-utils-1.0.0.tar.bz2
> --prefix=dtrace-utils-1.0.0/ 1.0-branch
>
> Thanks.
>
> Fred
>
> 2018-04-23 19:04 GMT+08:00 Tomas Jedlicka <tomas.jedlicka at oracle.com>:
>> Hi Fred,
>>
>> I suggest to start with updated README.md which has been added to github
>> repositories.
>>
>> https://github.com/oracle/dtrace-utils/blob/master/README.md
>>
>> Please check especially:
>> https://github.com/oracle/dtrace-utils/blob/master/README.md#3-packaging-information
>>
>> It is very likely that the RPM build is pulling in dependencies on
>> specific kernel-uek-devel
>> packages which you don't have. Try adjusting build arguments from
>> command line and/or
>> install the packages.
>>
>> Tomas
>>
>> On 04/23/2018 12:46 PM, Fred Liu wrote:
>>> Hello,
>>>
>>> I can successfully build the source but fail to build rpm package.
>>>
>>> [root at pvg04 dtrace-utils-1.0.0]# rpmbuild -ba dtrace-utils.spec
>>> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.g5f1jq
>>> + umask 022
>>> + cd /root/rpmbuild/BUILD
>>> + cd /root/rpmbuild/BUILD
>>> + rm -rf dtrace-utils-1.0.0
>>> + /usr/bin/tar -xf /root/rpmbuild/SOURCES/dtrace-utils-1.0.0.tar.bz2
>>> + cd dtrace-utils-1.0.0
>>> + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
>>> + mkdir -p /root/rpmbuild/BUILD/dtrace-utils-1.0.0/usr/include/linux/dtrace
>>> + cp -dr --preserve=mode,timestamps
>>> /usr/src/kernels/4.14.32-1.el7uek/include/uapi/linux/dtrace
>>> /root/rpmbuild/BUILD/dtrace-utils-1.0.0/usr/include/linux/
>>> + exit 0
>>> Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.G10uSE
>>> + umask 022
>>> + cd /root/rpmbuild/BUILD
>>> + cd dtrace-utils-1.0.0
>>> ++ getconf _NPROCESSORS_ONLN
>>> + make -j 4 VERSION=1.0.0 KERNELDIRPREFIX=/usr/src/kernels
>>> KERNELDIRSUFFIX= 'KERNELS=4.14.28-1.el7uek* 4.1.12-124.9.1.el7uek* '
>>> HDRPREFIX=/root/rpmbuild/BUILD/dtrace-utils-1.0.0/usr/include
>>> SED: libdtrace/signal.d
>>> AWK: libdtrace/errno.d
>>> CC: libdtrace/drti.c
>>> CC-32: libdtrace/drti.c
>>> YACC: libdtrace/dt_grammar.c
>>> MKNAMES: libdtrace/dt_names.c
>>> libdtrace/drti.c:52:1: warning: constructor priorities from 0 to 100
>>> are reserved for the implementation [enabled by default]
>>>    {
>>>    ^
>>> M4: libdtrace/procfs.d.in
>>> libdtrace/drti.c:52:1: warning: constructor priorities from 0 to 100
>>> are reserved for the implementation [enabled by default]
>>>    {
>>>    ^
>>> Macro "TASK_RUNNING" has no definition on this system.
>>> libdtrace/procfs.m4:14:0: warning: "__KERNEL__" redefined [enabled by default]
>>>    #define __KERNEL__
>>>    ^
>>> <command-line>:0:0: note: this is the location of the previous definition
>>> Error: Not all tokens in libdtrace/procfs.d.in defined in headers.
>>> make: *** [/root/rpmbuild/BUILD/dtrace-utils-1.0.0/build/dlibs/4.14.28/procfs.d]
>>> Error 1
>>> make: *** Deleting file
>>> `/root/rpmbuild/BUILD/dtrace-utils-1.0.0/build/dlibs/4.14.28/procfs.d'
>>> make: *** Waiting for unfinished jobs....
>>> error: Bad exit status from /var/tmp/rpm-tmp.G10uSE (%build)
>>>
>>>
>>> RPM build errors:
>>>       Bad exit status from /var/tmp/rpm-tmp.G10uSE (%build)
>>> [root at pvg04 dtrace-utils-1.0.0]#
>>>
>>> BTW, I mostly following
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_oracle_dtrace-2Dutils_blob_master_README&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=TH500uwHRHLHqjhgluCyxMsbZEewvpf7ynuq0G-WrEk&m=5Rn0_XksmmEH5Af-My2-4QPk8Xg8QoSuyhVJsdzS174&s=68u81fT9s-Gsm9EiNdATeSyngyqfUzN06qeCnDA5Oec&e=.
>>>
>>> Any ideas?
>>>
>>> Thanks.
>>>
>>> Fred
>>>
>>> _______________________________________________
>>> DTrace-devel mailing list
>>> DTrace-devel at oss.oracle.com
>>> https://oss.oracle.com/mailman/listinfo/dtrace-devel
>>
>> _______________________________________________
>> DTrace-devel mailing list
>> DTrace-devel at oss.oracle.com
>> https://oss.oracle.com/mailman/listinfo/dtrace-devel




More information about the DTrace-devel mailing list