Received: from mail.sgregoratto.me (mail.sgregoratto.me [149.28.166.45]) by mail.sr.ht (Postfix) with ESMTPS id 5B95A400DE for <~emersion/mrsh-dev@lists.sr.ht>; Wed, 30 Jan 2019 05:08:02 +0000 (UTC) Authentication-Results: mail.sr.ht; dkim=pass (1024-bit key) header.d=sgregoratto.me header.i=@sgregoratto.me header.b=ZF6pHq+0 Received: from mail.sgregoratto.me (localhost [127.0.0.1]) by mail.sgregoratto.me (Postfix) with ESMTP id 8E9B73E8A8 for <~emersion/mrsh-dev@lists.sr.ht>; Wed, 30 Jan 2019 16:07:40 +1100 (AEDT) Authentication-Results: mail.sgregoratto.me (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=sgregoratto.me DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sgregoratto.me; h=user-agent:content-disposition:content-type:content-type :mime-version:message-id:subject:subject:to:from:from:date:date; s=dkim; t=1548824860; x=1551416861; bh=FLW1Q/XuX0Vmrkkqarg7Ds90 G3gyjeZLLprJnrFAO3o=; b=ZF6pHq+04jNNKJU4p/ZiZXeH41hReWsoiuV2u8rq CZ764VRFqpKrpDQqSY2l8r9+Phj853m0iwTAgj4cEMSggOAXjzMNBnWW/3EJyEs3 5q/4pkY4GMTKf5tbREXtgKUn+pKrgAj3kO94LUhsk6geVHxSrZVjcbKc18UfqGz0 a9w= X-Virus-Scanned: Debian amavisd-new at mail.sgregoratto.me Received: from mail.sgregoratto.me ([127.0.0.1]) by mail.sgregoratto.me (mail.sgregoratto.me [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4lgHPv3z_SDU for <~emersion/mrsh-dev@lists.sr.ht>; Wed, 30 Jan 2019 16:07:40 +1100 (AEDT) Received: from localhost (172.44.179.58.sta.dodo.net.au [58.179.44.172]) by mail.sgregoratto.me (Postfix) with ESMTPSA id E4F623E824 for <~emersion/mrsh-dev@lists.sr.ht>; Wed, 30 Jan 2019 16:07:38 +1100 (AEDT) Date: Wed, 30 Jan 2019 16:07:38 +1100 From: Stephen Gregoratto To: ~emersion/mrsh-dev@lists.sr.ht Subject: Build failure on OpenBSD due to differing types for glob(3) Message-ID: <20190130050738.llqrjwzh3ioro2sd@BlackBox> Mail-Followup-To: ~emersion/mrsh-dev@lists.sr.ht MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="y7l6k55qpe2x5tvp" Content-Disposition: inline User-Agent: NeoMutt/20180716 --y7l6k55qpe2x5tvp Content-Type: multipart/mixed; boundary="p6wwp5ozd6e2jbsz" Content-Disposition: inline --p6wwp5ozd6e2jbsz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I tried building mrsh on OpenBSD, but it fails due to a type mismatch=20 for the glob(3) interface: POSIX/Linux/FreeBSD uses size_t but OpenBSD=20 uses int. Quoting from the manual[1]: The include file defines the structure type glob_t, which contains at least the following fields: typedef struct { int gl_pathc; /* count of total paths so far */ int gl_matchc; /* count of paths matching pattern */ int gl_offs; /* reserved at beginning of gl_pathv */ int gl_flags; /* returned flags */ char **gl_pathv; /* list of paths matching pattern */ } glob_t; I've attached a buildlog to show the error. Not sure how you'd fix this,=20 but I just casted glob_buf.gl_pathc to size_t. [1] https://man.openbsd.org/glob.3 --=20 Stephen Gregoratto PGP Fingerprint: 3FC6 3D0E 2801 C348 1C44 2D34 A80C 0F8E 8BAB EC8B Need my key? Get it with: gpg --keyserver pgp.mit.edu --recv-keys 8BABEC8B or off my server at https://www.sgregoratto.me/pubkey.txt --p6wwp5ozd6e2jbsz Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=buildlog Content-Transfer-Encoding: quoted-printable The Meson build system Version: 0.48.0 Source dir: /home/liquid/gits/mrsh Build dir: /home/liquid/gits/mrsh/build Build type: native build Project name: mrsh Project version: 0.0.0 Native C compiler: cc (clang 6.0.0 "OpenBSD clang version 6.0.0 (tags/RELEA= SE_600/final) (based on LLVM 6.0.0)") Build machine cpu family: x86_64 Build machine cpu: x86_64 Library readline found: YES Checking if "-Wl,--version-script" links: YES Program ./harness.sh found: YES (/bin/sh /home/liquid/gits/mrsh/test/./harn= ess.sh) Program sh found: YES (/bin/sh) Build targets in project: 3 WARNING: Trying to use none sanitizer on Clang with b_lundef. This will probably not work. Try setting b_lundef to false instead. Option werror is: True [default: true] Found ninja-1.8.2 at /usr/local/bin/ninja ninja: Entering directory `build' [1/65] Compiling C object 'mrsh@sha/shell_redir.c.o'. [2/65] Compiling C object 'mrsh@sha/hashtable.c.o'. [3/65] Compiling C object 'mrsh@sha/builtin_true.c.o'. [4/65] Compiling C object 'mrsh@sha/builtin_ulimit.c.o'. [5/65] Compiling C object 'mrsh@sha/parser_arithm.c.o'. [6/65] Compiling C object 'mrsh@sha/builtin_times.c.o'. [7/65] Compiling C object 'mrsh@sha/parser_word.c.o'. [8/65] Compiling C object 'mrsh@sha/builtin_unspecified.c.o'. [9/65] Compiling C object 'mrsh@sha/shell_task_assignment.c.o'. [10/65] Compiling C object 'mrsh@sha/builtin_unset.c.o'. [11/65] Compiling C object 'mrsh@sha/shell_entry.c.o'. [12/65] Compiling C object 'mrsh@sha/builtin_type.c.o'. [13/65] Compiling C object 'mrsh@sha/ast.c.o'. [14/65] Compiling C object 'mrsh@sha/arithm.c.o'. [15/65] Compiling C object 'mrsh@sha/builtin_dot.c.o'. [16/65] Compiling C object 'mrsh@sha/builtin_false.c.o'. [17/65] Compiling C object 'mrsh@sha/builtin_builtin.c.o'. [18/65] Compiling C object 'mrsh@sha/builtin_alias.c.o'. [19/65] Compiling C object 'mrsh@sha/ast_print.c.o'. [20/65] Compiling C object 'mrsh@sha/buffer.c.o'. [21/65] Compiling C object 'mrsh@sha/builtin_colon.c.o'. [22/65] Compiling C object 'mrsh@sha/shell_task_command.c.o'. [23/65] Compiling C object 'mrsh@sha/shell_word.c.o'. FAILED: mrsh@sha/shell_word.c.o=20 cc -Imrsh@sha -I. -I.. -I../include -Xclang -fcolor-diagnostics -pipe -D_FI= LE_OFFSET_BITS=3D64 -Wall -Winvalid-pch -Wextra -Werror -std=3Dc99 -g -Wno-= missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -DHAVE= _READLINE -fPIC -MD -MQ 'mrsh@sha/shell_word.c.o' -MF 'mrsh@sha/shell_word= =2Ec.o.d' -o 'mrsh@sha/shell_word.c.o' -c ../shell/word.c =2E./shell/word.c:160:25: error: comparison of integers of different signs:= 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] for (size_t i =3D 0; i < glob_buf.gl_pathc; ++i) { ~ ^ ~~~~~~~~~~~~~~~~~ 1 error generated. [24/65] Compiling C object 'mrsh@sha/shell_task_command_builtin.c.o'. ninja: build stopped: subcommand failed. --p6wwp5ozd6e2jbsz-- --y7l6k55qpe2x5tvp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEyC1hX0pZR01P17O45l88MdvU/vIFAlxRMRoACgkQ5l88MdvU /vJmZhAA2ItTcppMH0WUkkt51sIh6L7TPvf7yj0kYd/asnGoD4VpqMUe1Ndebpn0 t9NxPLnVJAxyxipnAdtC+74DVfrogdn6J5cvzHB4VCI4aP5B9inZIQPivqZHjvU8 a3gIyIsuNlhD8WwxsSlD7zDl9BUQaT4y7X14ott70xFviDyIYCAA1lZ3qQY5psc+ Od/ZPpqwWuSnC4Iysh0ChoezxqmxB4F20GNU4MtQw3pHuCotuslx05n/r6IlKnv8 aIcrS2qiW75xzq6opZsxookDc0ThbS8YHsX0Bs/3YENnb2dV/H9yh9S4QEgbbPe8 GkyUmTzFQzPUKLIvh7s6XI3rlwhbzLa2MSErY3IO5Kb5acl8IE6mzSzI7WwaLCRn C8ZKPNYHt2EtMprI7J3F2YiyoCNXNpxXmcwtd4jerWPNBTR9RVK5OuGPD0SfzCPv tXa+y0HwiiiO1UEKPxPkEQYOCMOq2li4BEF4UZBVRzTQFO/yBjNu6UofWCsbUCby paksDqOMth59GOkyWDl3rt8kN7QuT3E0ZGSfJTT4UnEQACrPmZBSfwzzP5VmlgDd a3I7cHZ4SvdAQhjMViv8gEX2dYGlzjta8ojpCm7A6jhEf/I6Qm0IL9ULhDPyGYhZ hWgCgmTztpq523L9jfsbwX+uJpZpK7ngy7hnA3d2CjUx4zmQqeI= =GXil -----END PGP SIGNATURE----- --y7l6k55qpe2x5tvp--