Page MenuHomeFreeBSD

devel/dwarves: Add new port
ClosedPublic

Authored by cem on May 7 2020, 5:27 AM.

Details

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

cem created this revision.May 7 2020, 5:27 AM
cem requested review of this revision.May 7 2020, 5:27 AM
cem added inline comments.May 7 2020, 5:31 AM
devel/dwarves/files/patch-lib_bpf_src_libbpf.c
48–55 ↗(On Diff #71492)

Whoops, this hunk can be dropped now that the whole segment is ifdef'd out. It was somewhat difficult to discover which pieces of libbpf dwarves actually needs. The short version is: not very much. Will plan to remove in the next update.

jrm added a comment.May 7 2020, 1:34 PM

Could you also run it through portfmt and portclippy from ports-mgmt/portfmt?

devel/dwarves/Makefile
5 ↗(On Diff #71492)

DISTVERSION= 1.17

18 ↗(On Diff #71492)

I think you can put a short explanation here.

% portgrep 'IGNORE_FreeBSD_11='
devel/elfutils:
        IGNORE_FreeBSD_11=      fails to build: fails to compile dwarf_abbrev_hash.c

games/linux-steam-utils:
        IGNORE_FreeBSD_11=not tested at all

lang/crystal:
        IGNORE_FreeBSD_11=      prebuilt bootstrap only built for FreeBSD >=12 (ino64)

lang/zig:
        IGNORE_FreeBSD_11=      expects getrandom(2) which is unavailable on FreeBSD < 12.0

sysutils/apache-mesos:
        IGNORE_FreeBSD_11=      does not build

sysutils/crate:
        IGNORE_FreeBSD_11=      getline isn't available on 11 by simply including <stdio.h> as its manpage says #'

sysutils/iichid:
        IGNORE_FreeBSD_11=      Requires FreeBSD 12.1 or later

x11/xlockmore:
        IGNORE_FreeBSD_11=      FREETYPE support requires FreeBSD version 12+
20–21 ↗(On Diff #71492)
LIB_DEPENDS=  libargp.so:devel/argp-standalone \
              libdw.so:devel/elfutils
36 ↗(On Diff #71492)

Either post-extract: or post-patch:

37 ↗(On Diff #71492)

${REINPLACE_CMD} -e ...

42 ↗(On Diff #71492)

${REINPLACE_CMD} -e ...

44–46 ↗(On Diff #71492)
@${MKDIR} ${WRKSRC}/asm \
	 ${WRKSRC}/bits \
	 ${WRKSRC}/linux
devel/dwarves/pkg-descr
5 ↗(On Diff #71492)

Is this the correct URL?

cem updated this revision to Diff 71501.May 7 2020, 2:24 PM
cem marked 7 inline comments as done.

Address review feedback (thanks jrm):

  • DISTVERSION
  • IGNORE explanation
  • LIB_DEPENDS formatting
  • post-patch where possible
  • REINPLACE_CMD (that's a mouthful!)
  • Single MKDIR invocation

I will take a look at portfmt/portclippy in a 2nd pass.

devel/dwarves/Makefile
36 ↗(On Diff #71492)

I moved the non-gnulib parts to post-patch and left gnulib in pre-configure so that it can use a normal build_depends, like devel/elfutils. Does that seem ok?

devel/dwarves/pkg-descr
5 ↗(On Diff #71492)

It is the author's blog and the closest thing to a website the project has, unfortunately. E.g., this is the URL the redhat package uses, and it is maintained by the dwarves author. I suppose we could link to https://github.com/acmel/dwarves instead.

This is the dwarves-specific category on the blog: https://acmel.wordpress.com/category/dwarves/ . It's pretty sparse.

Any preference?

cem updated this revision to Diff 71502.May 7 2020, 2:42 PM
  • portfmt
  • portclippy
  • removed vestigial hunk in libbpf.c patch
jrm added a comment.May 7 2020, 5:04 PM
  • I have no preference for WWW. Whatever you think is more appropriate.
  • The build fails on 12i386. Can we either fix this, or add ONLY_FOR_ARCHS= amd64?

http://pkg.awarnach.mathstat.dal.ca/data/12i386-default/2020-05-07_14h00m40s/logs/errors/dwarves-1.17.log

cem added a comment.May 7 2020, 5:15 PM
In D24746#544658, @jrm wrote:
  • The build fails on 12i386. Can we either fix this, or add ONLY_FOR_ARCHS= amd64?

http://pkg.awarnach.mathstat.dal.ca/data/12i386-default/2020-05-07_14h00m40s/logs/errors/dwarves-1.17.log

Hm, this is concerning. Why is gcc9 on 12i386 not defining __LP64__ nor __ILP32__?

GCC seems broken:

$ gcc9 -x c -dM -E /dev/null | grep LP
#define __LP64__ 1
#define _LP64 1
$ gcc9 -m32 -x c -dM -E /dev/null | grep LP
<empty>

Clang defines __ILP32__ correctly in -m32 mode, as is canonical (arch(7)).

We can work around this with __SIZEOF_LONG__, which Clang also supports, but I'll follow up with a GCC bug.

cem updated this revision to Diff 71513.May 7 2020, 5:18 PM
  • Work around broken GCC definitions

Please try 12i386 again. Thanks!

cem updated this revision to Diff 71514.May 7 2020, 5:20 PM

discard vestigial hunk which crept back in

This revision is now accepted and ready to land.May 7 2020, 5:23 PM
cem added a comment.May 7 2020, 5:26 PM

Hm, does the i386 build successfully link? I noticed warning: implicit declaration of function 'fls64' in your earlier build log which seems like it could be problematic if it still shows up with the workaround.

jrm added a comment.May 7 2020, 5:27 PM
In D24746#544669, @cem wrote:

Hm, does the i386 build successfully link? I noticed warning: implicit declaration of function 'fls64' in your earlier build log which seems like it could be problematic if it still shows up with the workaround.

It did. http://pkg.awarnach.mathstat.dal.ca/data/12i386-default/2020-05-07_14h20m10s/logs/dwarves-1.17.log

This revision was automatically updated to reflect the committed changes.