Topics

Trying to compile hping3 from sources #devtool


Vaijayanthi
 

Hi, I am using devtool add hping3 https://github.com/antirez/hping to add hping3 as part of our custom image. Here is my recipe:

# Recipe created by recipetool

# This is the basis of a recipe and may need further editing in order to be fully functional.

# (Feel free to remove these comments when editing.)

 

# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is

# your responsibility to verify that the values are complete and correct.

#

# The following license files were not able to be identified and are

# represented as "Unknown" below, you will need to check them yourself:

#   COPYING

LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "file://COPYING;md5=3728a6c4c9630a9e796ad4b82dacd887"

 

SRC_URI = "git://github.com/antirez/hping;protocol=https"

 

# Modify these as desired

PV = "1.0+git${SRCPV}"

SRCREV = "3547c7691742c6eaa31f8402e0ccbb81387c1b99"

 

S = "${WORKDIR}/git"

 

#DEPENDS = "libpcap"

RDEPENDS_${PN} += " libpcap tcl-lib tcl"

 

# NOTE: no Makefile found, unable to determine what needs to be done

 

do_configure () {

    # Specify any needed configure commands here

    CONFIGOSTYPE="LINUX" ./configure

}

 

do_compile () {

    # Specify compilation commands here

    make

}

do_install() {

    #install -Dm755 ${B}/libpcap.so.0.8 ${D}${libdir}/libpcap.so.0.8

    #ln -sf libpcap.so.0.8 ${D}${libdir}/libpcap.so

    #install -Dm755 ${B}/libtcl8.6.so ${D}${libdir}/libtcl8.6.so

    #ln -sf libtcl8.6.so ${D}${libdir}/libtcl8.6.so

    install -m 0755 -d ${D}${sbindir} ${D}/${mandir} ${D}${docdir}/hping3

    install -m 0755 hping3 ${D}/${sbindir}

    install -m 0644 docs/hping3.8 ${D}/${mandir}

    install -m 0644 docs/HPING2-HOWTO.txt docs/HPING2-IS-OPEN \

        docs/MORE-FUN-WITH-IPID docs/SPOOFED_SCAN.txt \

        docs/AS-BACKDOOR docs/APD.txt ${D}${docdir}/hping3

}

 

#INSANE_SKIP_${PN}-dev = "ldflags"

#INSANE_SKIP_${PN} = "ldflags"

#INSANE_SKIP_${PN} += "file-rdeps dev-deps"

 
How do I add this to my custom bitbake layer? Also, make is complaining about
ERROR: hping3-1.0+git999-r0 do_package_qa: QA Issue: /usr/sbin/hping3 contained in package hping3 requires libpcap.so.0.8()(64bit), but no providers found in RDEPENDS_hping3? [file-rdeps]
ERROR: hping3-1.0+git999-r0 do_package_qa: QA Issue: /usr/sbin/hping3 contained in package hping3 requires libtcl8.6.so()(64bit), but no providers found in RDEPENDS_hping3? [file-rdeps]
ERROR: hping3-1.0+git999-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.

Please let me know what I should I do next to integrate this recipe with my custom meta layer and also, address the make failures.



Khem Raj
 

whats the name of your recipe ? secondly hping3 requires libtcl8.6.so
seems to be troublesome because its asking
for devel package not the original library, I wonder why, can you find
out the linker cmdline where ping3 is getting linked ?

On Fri, Nov 6, 2020 at 6:31 PM Vaijayanthi <vaijayanthi@silver-peak.com> wrote:

Hi, I am using devtool add hping3 https://github.com/antirez/hping to add hping3 as part of our custom image. Here is my recipe:

# Recipe created by recipetool

# This is the basis of a recipe and may need further editing in order to be fully functional.

# (Feel free to remove these comments when editing.)



# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is

# your responsibility to verify that the values are complete and correct.

#

# The following license files were not able to be identified and are

# represented as "Unknown" below, you will need to check them yourself:

# COPYING

LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "file://COPYING;md5=3728a6c4c9630a9e796ad4b82dacd887"



SRC_URI = "git://github.com/antirez/hping;protocol=https"



# Modify these as desired

PV = "1.0+git${SRCPV}"

SRCREV = "3547c7691742c6eaa31f8402e0ccbb81387c1b99"



S = "${WORKDIR}/git"



#DEPENDS = "libpcap"

RDEPENDS_${PN} += " libpcap tcl-lib tcl"



# NOTE: no Makefile found, unable to determine what needs to be done



do_configure () {

# Specify any needed configure commands here

CONFIGOSTYPE="LINUX" ./configure

}



do_compile () {

# Specify compilation commands here

make

}

do_install() {

#install -Dm755 ${B}/libpcap.so.0.8 ${D}${libdir}/libpcap.so.0.8

#ln -sf libpcap.so.0.8 ${D}${libdir}/libpcap.so

#install -Dm755 ${B}/libtcl8.6.so ${D}${libdir}/libtcl8.6.so

#ln -sf libtcl8.6.so ${D}${libdir}/libtcl8.6.so

install -m 0755 -d ${D}${sbindir} ${D}/${mandir} ${D}${docdir}/hping3

install -m 0755 hping3 ${D}/${sbindir}

install -m 0644 docs/hping3.8 ${D}/${mandir}

install -m 0644 docs/HPING2-HOWTO.txt docs/HPING2-IS-OPEN \

docs/MORE-FUN-WITH-IPID docs/SPOOFED_SCAN.txt \

docs/AS-BACKDOOR docs/APD.txt ${D}${docdir}/hping3

}



#INSANE_SKIP_${PN}-dev = "ldflags"

#INSANE_SKIP_${PN} = "ldflags"

#INSANE_SKIP_${PN} += "file-rdeps dev-deps"


How do I add this to my custom bitbake layer? Also, make is complaining about
ERROR: hping3-1.0+git999-r0 do_package_qa: QA Issue: /usr/sbin/hping3 contained in package hping3 requires libpcap.so.0.8()(64bit), but no providers found in RDEPENDS_hping3? [file-rdeps]
ERROR: hping3-1.0+git999-r0 do_package_qa: QA Issue: /usr/sbin/hping3 contained in package hping3 requires libtcl8.6.so()(64bit), but no providers found in RDEPENDS_hping3? [file-rdeps]
ERROR: hping3-1.0+git999-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.

Please let me know what I should I do next to integrate this recipe with my custom meta layer and also, address the make failures.





Khem Raj
 

On Sat, Nov 7, 2020 at 11:57 AM Muralidharan, Vaijayanthi
<vaijayanthi.muralidharan@hpe.com> wrote:

Khem,

Thanks for responding. I am trying to build hping3 from sources. There is only a bb recipe for hping2.
what is your failing recipe called (exact name )

On 11/6/20, 9:42 PM, "Khem Raj" <raj.khem@gmail.com> wrote:

whats the name of your recipe ? secondly hping3 requires libtcl8.6.so
seems to be troublesome because its asking
for devel package not the original library, I wonder why, can you find
out the linker cmdline where ping3 is getting linked ?

On Fri, Nov 6, 2020 at 6:31 PM Vaijayanthi <vaijayanthi@silver-peak.com> wrote:
>
> Hi, I am using devtool add hping3 https://github.com/antirez/hping to add hping3 as part of our custom image. Here is my recipe:
>
> # Recipe created by recipetool
>
> # This is the basis of a recipe and may need further editing in order to be fully functional.
>
> # (Feel free to remove these comments when editing.)
>
>
>
> # WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is
>
> # your responsibility to verify that the values are complete and correct.
>
> #
>
> # The following license files were not able to be identified and are
>
> # represented as "Unknown" below, you will need to check them yourself:
>
> # COPYING
>
> LICENSE = "GPLv2"
>
> LIC_FILES_CHKSUM = "file://COPYING;md5=3728a6c4c9630a9e796ad4b82dacd887"
>
>
>
> SRC_URI = "git://github.com/antirez/hping;protocol=https"
>
>
>
> # Modify these as desired
>
> PV = "1.0+git${SRCPV}"
>
> SRCREV = "3547c7691742c6eaa31f8402e0ccbb81387c1b99"
>
>
>
> S = "${WORKDIR}/git"
>
>
>
> #DEPENDS = "libpcap"
>
> RDEPENDS_${PN} += " libpcap tcl-lib tcl"
>
>
>
> # NOTE: no Makefile found, unable to determine what needs to be done
>
>
>
> do_configure () {
>
> # Specify any needed configure commands here
>
> CONFIGOSTYPE="LINUX" ./configure
>
> }
>
>
>
> do_compile () {
>
> # Specify compilation commands here
>
> make
>
> }
>
> do_install() {
>
> #install -Dm755 ${B}/libpcap.so.0.8 ${D}${libdir}/libpcap.so.0.8
>
> #ln -sf libpcap.so.0.8 ${D}${libdir}/libpcap.so
>
> #install -Dm755 ${B}/libtcl8.6.so ${D}${libdir}/libtcl8.6.so
>
> #ln -sf libtcl8.6.so ${D}${libdir}/libtcl8.6.so
>
> install -m 0755 -d ${D}${sbindir} ${D}/${mandir} ${D}${docdir}/hping3
>
> install -m 0755 hping3 ${D}/${sbindir}
>
> install -m 0644 docs/hping3.8 ${D}/${mandir}
>
> install -m 0644 docs/HPING2-HOWTO.txt docs/HPING2-IS-OPEN \
>
> docs/MORE-FUN-WITH-IPID docs/SPOOFED_SCAN.txt \
>
> docs/AS-BACKDOOR docs/APD.txt ${D}${docdir}/hping3
>
> }
>
>
>
> #INSANE_SKIP_${PN}-dev = "ldflags"
>
> #INSANE_SKIP_${PN} = "ldflags"
>
> #INSANE_SKIP_${PN} += "file-rdeps dev-deps"
>
>
> How do I add this to my custom bitbake layer? Also, make is complaining about
> ERROR: hping3-1.0+git999-r0 do_package_qa: QA Issue: /usr/sbin/hping3 contained in package hping3 requires libpcap.so.0.8()(64bit), but no providers found in RDEPENDS_hping3? [file-rdeps]
> ERROR: hping3-1.0+git999-r0 do_package_qa: QA Issue: /usr/sbin/hping3 contained in package hping3 requires libtcl8.6.so()(64bit), but no providers found in RDEPENDS_hping3? [file-rdeps]
> ERROR: hping3-1.0+git999-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
>
> Please let me know what I should I do next to integrate this recipe with my custom meta layer and also, address the make failures.
>
>
>
>
>


Khem Raj
 

Hey Manasa !!

Long time, happy to hear from you. I hope you are doing well,

Hi Vaijayanthi

I took a look at hping3 and its one package thats not cross-compile
friendly, So no wonder Vaijayanthi was finding all sorts of issues.
It was looking at host system for tcl and all kind of other headers
which was causing the issues you were seeing.

Just for Manasa I gave it a whirl :) and here is a version which should
work (At least it compiles), its completely untested but I hope it will
unblock you

https://github.com/YoeDistro/meta-openembedded/commit/c4a5be527f61f286cd47352f56b563390a4e3d58

You can download this

curl -O
https://github.com/YoeDistro/meta-openembedded/commit/c4a5be527f61f286cd47352f56b563390a4e3d58.patch

cd meta-openembedded

git am c4a5be527f61f286cd47352f56b563390a4e3d58.patch

then

bitbake hping3

Let me know if it is helpful

Thank you

-Khem

On 11/12/20 12:59 PM, Godavarthi, Manasa wrote:
Hi Raj,

 

Small world! Hope you are doing well. I would love to catch up sometime
with you.

 

Vaijayanthi also worked with me at Juniper. We really appreciate your
help regarding hping3. Basically, there is no recipe for hping3, looks
like. So, Vaijayanthi is trying to compile from source and include it as
part of our Yocto build and SDK so that hping3 binary is available as
part of our linux distro.

 

Regards,

--Manasa

 

*From: *Muralidharan, Vaijayanthi <vaijayanthi.muralidharan@hpe.com>
*Date: *Thursday, November 12, 2020 at 12:36 PM
*To: *raj.khem@gmail.com <raj.khem@gmail.com>
*Cc: *Vaijayanthi <vaijayanthi@silver-peak.com>, Yocto-mailing-list
<yocto@lists.yoctoproject.org>, Godavarthi, Manasa
<manasa.godavarthi@hpe.com>
*Subject: *Re: [yocto] Trying to compile hping3 from sources #devtool

Just to add more to this: I managed to build via bitbake successfully.
But "make" fails with the following error:
Problem: package packagegroup-sps-all-1.0-r0.noarch requires
packagegroup-sps-network-utils, but none of the providers can be installed
  - package packagegroup-sps-network-utils-1.0-r0.noarch requires
hping3, but none of the providers can be installed
  - conflicting requests
  - nothing provides libpcap.so.0.8()(64bit) needed by
hping3-git-r0.core2_64
  - nothing provides libtcl8.6.so()(64bit) needed by hping3-git-r0.core2_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest'
to use not only best candidate packages)

ERROR: sps-image-vxoa-1.0-r0 do_rootfs:

I have added RDENPDS for libpcap and libtcl in hping3's recipe.

On 11/9/20, 4:06 PM, "Muralidharan, Vaijayanthi"
<vaijayanthi.muralidharan@hpe.com> wrote:

    This is a recipe that was created via devtool.

    devtool add hping3 https://github.com/antirez/hping

    On 11/9/20, 10:43 AM, "Muralidharan, Vaijayanthi"
<vaijayanthi.muralidharan@hpe.com> wrote:

        hping3_git.bb

        On 11/7/20, 12:04 PM, "yocto@lists.yoctoproject.org on behalf of
Khem Raj via lists.yoctoproject.org" <yocto@lists.yoctoproject.org on
behalf of raj.khem=gmail.com@lists.yoctoproject.org> wrote:

            On Sat, Nov 7, 2020 at 11:57 AM Muralidharan, Vaijayanthi
            <vaijayanthi.muralidharan@hpe.com> wrote:
            >
            > Khem,
            >
            > Thanks for responding. I am trying to build hping3 from
sources. There is only a bb recipe for hping2.
            >

            what is your failing recipe called (exact name )

            > On 11/6/20, 9:42 PM, "Khem Raj" <raj.khem@gmail.com> wrote:
            >
            >     whats the name of your recipe ? secondly hping3
requires libtcl8.6.so
            >     seems to be troublesome because its asking
            >     for devel package not the original library, I wonder
why, can you find
            >     out the linker cmdline where ping3 is getting linked ?
            >
            >     On Fri, Nov 6, 2020 at 6:31 PM Vaijayanthi
<vaijayanthi@silver-peak.com> wrote:
            >     >
            >     > Hi, I am using devtool add hping3
https://github.com/antirez/hping to add hping3 as part of our custom
image. Here is my recipe:
            >     >
            >     > # Recipe created by recipetool
            >     >
            >     > # This is the basis of a recipe and may need further
editing in order to be fully functional.
            >     >
            >     > # (Feel free to remove these comments when editing.)
            >     >
            >     >
            >     >
            >     > # WARNING: the following LICENSE and
LIC_FILES_CHKSUM values are best guesses - it is
            >     >
            >     > # your responsibility to verify that the values are
complete and correct.
            >     >
            >     > #
            >     >
            >     > # The following license files were not able to be
identified and are
            >     >
            >     > # represented as "Unknown" below, you will need to
check them yourself:
            >     >
            >     > #   COPYING
            >     >
            >     > LICENSE = "GPLv2"
            >     >
            >     > LIC_FILES_CHKSUM =
"file://COPYING;md5=3728a6c4c9630a9e796ad4b82dacd887
<file:///COPYING;md5=3728a6c4c9630a9e796ad4b82dacd887>"
            >     >
            >     >
            >     >
            >     > SRC_URI =
"git://github.com/antirez/hping;protocol=https"
            >     >
            >     >
            >     >
            >     > # Modify these as desired
            >     >
            >     > PV = "1.0+git${SRCPV}"
            >     >
            >     > SRCREV = "3547c7691742c6eaa31f8402e0ccbb81387c1b99"
            >     >
            >     >
            >     >
            >     > S = "${WORKDIR}/git"
            >     >
            >     >
            >     >
            >     > #DEPENDS = "libpcap"
            >     >
            >     > RDEPENDS_${PN} += " libpcap tcl-lib tcl"
            >     >
            >     >
            >     >
            >     > # NOTE: no Makefile found, unable to determine what
needs to be done
            >     >
            >     >
            >     >
            >     > do_configure () {
            >     >
            >     >     # Specify any needed configure commands here
            >     >
            >     >     CONFIGOSTYPE="LINUX" ./configure
            >     >
            >     > }
            >     >
            >     >
            >     >
            >     > do_compile () {
            >     >
            >     >     # Specify compilation commands here
            >     >
            >     >     make
            >     >
            >     > }
            >     >
            >     > do_install() {
            >     >
            >     >     #install -Dm755 ${B}/libpcap.so.0.8
${D}${libdir}/libpcap.so.0.8
            >     >
            >     >     #ln -sf libpcap.so.0.8 ${D}${libdir}/libpcap.so
            >     >
            >     >     #install -Dm755 ${B}/libtcl8.6.so
${D}${libdir}/libtcl8.6.so
            >     >
            >     >     #ln -sf libtcl8.6.so ${D}${libdir}/libtcl8.6.so
            >     >
            >     >     install -m 0755 -d ${D}${sbindir} ${D}/${mandir}
${D}${docdir}/hping3
            >     >
            >     >     install -m 0755 hping3 ${D}/${sbindir}
            >     >
            >     >     install -m 0644 docs/hping3.8 ${D}/${mandir}
            >     >
            >     >     install -m 0644 docs/HPING2-HOWTO.txt
docs/HPING2-IS-OPEN \
            >     >
            >     >         docs/MORE-FUN-WITH-IPID docs/SPOOFED_SCAN.txt \
            >     >
            >     >         docs/AS-BACKDOOR docs/APD.txt
${D}${docdir}/hping3
            >     >
            >     > }
            >     >
            >     >
            >     >
            >     > #INSANE_SKIP_${PN}-dev = "ldflags"
            >     >
            >     > #INSANE_SKIP_${PN} = "ldflags"
            >     >
            >     > #INSANE_SKIP_${PN} += "file-rdeps dev-deps"
            >     >
            >     >
            >     > How do I add this to my custom bitbake layer? Also,
make is complaining about
            >     > ERROR: hping3-1.0+git999-r0 do_package_qa: QA Issue:
/usr/sbin/hping3 contained in package hping3 requires
libpcap.so.0.8()(64bit), but no providers found in RDEPENDS_hping3?
[file-rdeps]
            >     > ERROR: hping3-1.0+git999-r0 do_package_qa: QA Issue:
/usr/sbin/hping3 contained in package hping3 requires
libtcl8.6.so()(64bit), but no providers found in RDEPENDS_hping3?
[file-rdeps]
            >     > ERROR: hping3-1.0+git999-r0 do_package_qa: QA run
found fatal errors. Please consider fixing them.
            >     >
            >     > Please let me know what I should I do next to
integrate this recipe with my custom meta layer and also, address the
make failures.
            >     >
            >     >
            >     >
            >     >
            >     >
            >