Bug 235636 - archivers/arj: build error: Abort trap after upgrading to FreeBSD 12.0
Summary: archivers/arj: build error: Abort trap after upgrading to FreeBSD 12.0
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-10 08:08 UTC by Peter Putzer
Modified: 2019-08-08 18:25 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (garga)


Attachments
Fix attempt (1.31 KB, patch)
2019-08-08 14:46 UTC, Renato Botelho
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Putzer 2019-02-10 08:08:55 UTC
After upgrading a server to FreeBSD 12.0, I cannot build arj anymore. It seems like the issue is the same as bug #219716, which is supposed to have been fixed. I've tried all three locale config options.

...
/usr/local/libexec/ccache/world/cc -DLOCALE=LANG_en -DLOCALE_DESC="\"en\"" -DPKGLIBDIR="\"/usr/local/lib/arj\"" -D_UNIX -O3 -pipe -funroll-loops -march=native  -fstack-protector -fno-strict-aliasing  -fstack-protector  -s gnu/stripgcc.lnk -o freebsd12.0/en/rs/tools/msgbind ./freebsd12.0/en/rs/tools/filemode.o ./freebsd12.0/en/rs/tools/msgbind.o ./freebsd12.0/en/rs/tools/arjdata.o ./freebsd12.0/en/rs/tools/crc32.o 
./freebsd12.0/en/rs/tools/msgbind ./resource/resource.txt msg_crp UNIX s en ./freebsd12.0/en/rs
gmake[3]: *** [GNUmakefile:258: freebsd12.0/en/rs/msg_crp.h] Abort trap
gmake[3]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
gmake[2]: *** [GNUmakefile:169: all] Error 2
gmake[2]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/archivers/arj
*** Error code 1

Stop.
make: stopped in /usr/ports/archivers/arj
Comment 1 Peter Putzer 2019-02-10 08:13:34 UTC
OK, I've now review bug #219716 more closely and it appears to be something different. (Not sure if it makes a difference, but "WITH_LLD_IS_LD=yes" is NOT set in my make.conf.)
Comment 2 Renato Botelho freebsd_committer 2019-02-25 13:42:59 UTC
I couldn't reproduce this issue on FreeBSD 12.0 amd64. what is the content of your /etc/make.conf?
Comment 3 Peter Putzer 2019-02-25 15:35:11 UTC
(In reply to Renato Botelho from comment #2)

DEFAULT_VERSIONS= bdb=5 perl5=5.28 mysql=10.3m php=7.2 ruby=2.4 ssl=libressl
CPUTYPE?=native
CFLAGS= -O3 -pipe -funroll-loops

INDEXDIR=               /usr/ports
WRKDIRPREFIX=           /var/ports
DISTDIR=                /var/ports/distfiles
PACKAGES=               /var/ports/packages

OPTIONS_UNSET=X11 GSSAPI_BASE
OPTIONS_SET= GSSAPI_MIT
WITH_PKGNG=yes
WITH_CCACHE_BUILD=yes
WITH_LIBCPLUSPLUS=yes
Comment 4 Renato Botelho freebsd_committer 2019-03-29 13:12:27 UTC
Even with the same make.conf I couldn't reproduce this failure
Comment 5 Peter Putzer 2019-03-29 20:56:20 UTC
(In reply to Renato Botelho from comment #4)

Well, I tried to check again from scratch and did a `make distclean`, no the port is broken again (arj_3.10.22-17.debian.tar.xz is not available anymore).
Comment 6 Renato Botelho freebsd_committer 2019-07-16 18:49:22 UTC
(In reply to Peter Putzer from comment #5)
Fixed now. Could you please try again?
Comment 7 Peter Putzer 2019-07-16 18:57:50 UTC
(In reply to Renato Botelho from comment #6)

===>  Cleaning for arj-3.10.22_7
===>  License GPLv2 accepted by the user
===>   arj-3.10.22_7 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by arj-3.10.22_7 for building
===>  Extracting for arj-3.10.22_7
=> SHA256 Checksum OK for arj-3.10.22.tar.gz.
=> SHA256 Checksum OK for arj_3.10.22-17.debian.tar.xz.
===>  Patching for arj-3.10.22_7
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/001_arches_align.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/003_64_bit_clean.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/004_parallel_build.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/005_use_system_strnlen.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/006_use_safe_strcpy.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/out-of-bounds-read.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/remove_build_date.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/security-afl.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/security-traversal-dir.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/security-traversal-symlink.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/security_format.patch
===>  Applying extra patch /var/ports/usr/ports/archivers/arj/work/debian/patches/self_integrity_64bit.patch
===>  Applying FreeBSD patches for arj-3.10.22_7
===>   arj-3.10.22_7 depends on package: autoconf>=2.69 - found
===>   arj-3.10.22_7 depends on package: automake>=1.16.1 - found
===>   arj-3.10.22_7 depends on executable: gmake - found
===>  Configuring for arj-3.10.22_7
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:162: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2729: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
configure.in:162: the top level
configure.in:162: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2729: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
configure.in:162: the top level
configure.in:162: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2729: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
configure.in:162: the top level
configure.in:162: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2729: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
configure.in:162: the top level
configure: loading site script /usr/ports/Templates/config.site
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... amd64-portbld-freebsd12.0
checking host system type... amd64-portbld-freebsd12.0
checking for gcc... /usr/local/libexec/ccache/world/cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/libexec/ccache/world/cc accepts -g... yes
checking for /usr/local/libexec/ccache/world/cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for fcntl.h... (cached) yes
checking for limits.h... (cached) yes
checking for malloc.h... (cached) no
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking whether byte ordering is bigendian... no
checking whether /usr/local/libexec/ccache/world/cc needs -traditional... no
checking for working memcmp... yes
checking return type of signal handlers... void
checking for vprintf... (cached) yes
checking for _doprnt... no
checking for getcwd... (cached) yes
checking for min... no
checking for max... no
checking for mkdir... yes
checking for mkdtemp... (cached) yes
checking for rmdir... yes
checking for fcloseall... yes
checking for strcasecmp... (cached) yes
checking for setpriority... yes
checking for strdup... (cached) yes
checking for strerror... (cached) yes
checking for strstr... (cached) yes
checking for strnlen... (cached) yes
checking for strupr... no
checking for strlwr... no
checking for strtol... (cached) yes
checking for strtoul... (cached) yes
checking if dynamic C library may be used... yes
checking if SFX executables may be packed... yes
checking what to use as a dedicated output directory... freebsd12.0
checking fnmatch() tolerance to incomplete patterns acting as filenames... yes
checking if color output is demanded... no
configure: creating ./config.status
config.status: creating ../GNUmakefile
config.status: WARNING:  'makefile.in' seems to ignore the --datarootdir setting
config.status: creating ../c_defs.h
===>  Building for arj-3.10.22_7
gmake[2]: Entering directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
mkdir -p ./freebsd12.0/en/rs
mkdir -p ./freebsd12.0/en/rs/tools
mkdir -p ./freebsd12.0/en/rs/arjcrypt
mkdir -p ./freebsd12.0/en/rs/sfxstub
mkdir -p ./freebsd12.0/en/rs/arjsfxv
mkdir -p ./freebsd12.0/en/rs/arjsfx
mkdir -p ./freebsd12.0/en/rs/arjsfxjr
mkdir -p ./freebsd12.0/en/rs/arj
mkdir -p ./freebsd12.0/en/rs/rearj
mkdir -p ./freebsd12.0/en/rs/register
mkdir -p ./freebsd12.0/en/rs/arjdisp
gmake msg-headers
gmake[3]: Entering directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
/usr/local/libexec/ccache/world/cc -DARJUTIL -c -Ifreebsd12.0 -I./freebsd12.0/en/rs -I. -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -DLOCALE=LANG_en -DLOCALE_DESC="\"en\"" -DPKGLIBDIR="\"/usr/local/lib/arj\"" -D_UNIX -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -ofreebsd12.0/en/rs/tools/filemode.o filemode.c
/usr/local/libexec/ccache/world/cc -DARJUTIL -c -Ifreebsd12.0 -I./freebsd12.0/en/rs -I. -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -DLOCALE=LANG_en -DLOCALE_DESC="\"en\"" -DPKGLIBDIR="\"/usr/local/lib/arj\"" -D_UNIX -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -ofreebsd12.0/en/rs/tools/msgbind.o msgbind.c
/usr/local/libexec/ccache/world/cc -DARJUTIL -c -Ifreebsd12.0 -I./freebsd12.0/en/rs -I. -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -DLOCALE=LANG_en -DLOCALE_DESC="\"en\"" -DPKGLIBDIR="\"/usr/local/lib/arj\"" -D_UNIX -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -ofreebsd12.0/en/rs/tools/arjdata.o arjdata.c
/usr/local/libexec/ccache/world/cc -DARJUTIL -c -Ifreebsd12.0 -I./freebsd12.0/en/rs -I. -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -DLOCALE=LANG_en -DLOCALE_DESC="\"en\"" -DPKGLIBDIR="\"/usr/local/lib/arj\"" -D_UNIX -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -ofreebsd12.0/en/rs/tools/crc32.o crc32.c
msgbind.c:452:50: warning: if statement has empty body [-Wempty-body]
  if(argv[6][strlen(argv[6])-1]!=PATHSEP_DEFAULT);
                                                 ^
msgbind.c:452:50: note: put the semicolon on a separate line to silence this warning
1 warning generated.
/usr/local/libexec/ccache/world/cc -DLOCALE=LANG_en -DLOCALE_DESC="\"en\"" -DPKGLIBDIR="\"/usr/local/lib/arj\"" -D_UNIX -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -fstack-protector-strong  -s gnu/stripgcc.lnk -o freebsd12.0/en/rs/tools/msgbind ./freebsd12.0/en/rs/tools/filemode.o ./freebsd12.0/en/rs/tools/msgbind.o ./freebsd12.0/en/rs/tools/arjdata.o ./freebsd12.0/en/rs/tools/crc32.o 
./freebsd12.0/en/rs/tools/msgbind ./resource/resource.txt msg_crp UNIX s en ./freebsd12.0/en/rs
gmake[3]: *** [GNUmakefile:258: freebsd12.0/en/rs/msg_crp.h] Abort trap
gmake[3]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
gmake[2]: *** [GNUmakefile:169: all] Error 2
gmake[2]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/archivers/arj
*** Error code 1

Stop.
make: stopped in /usr/ports/archivers/arj

===>>> make build failed for archivers/arj
===>>> Aborting update
Comment 8 Renato Botelho freebsd_committer 2019-07-17 11:59:49 UTC
(In reply to Peter Putzer from comment #7)
Please comment out CPUTYPE and CFLAGS lines from /etc/make.conf and try again
Comment 9 Peter Putzer 2019-07-18 21:08:16 UTC
(In reply to Renato Botelho from comment #8)

Same result.

[...]

/usr/local/libexec/ccache/world/cc -DARJUTIL -c -Ifreebsd12.0 -I./freebsd12.0/en/rs -I. -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -DLOCALE=LANG_en -DLOCALE_DESC="\"en\"" -DPKGLIBDIR="\"/usr/local/lib/arj\"" -D_UNIX -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -ofreebsd12.0/en/rs/tools/crc32.o crc32.c
msgbind.c:452:50: warning: if statement has empty body [-Wempty-body]
  if(argv[6][strlen(argv[6])-1]!=PATHSEP_DEFAULT);
                                                 ^
msgbind.c:452:50: note: put the semicolon on a separate line to silence this warning
1 warning generated.
/usr/local/libexec/ccache/world/cc -DLOCALE=LANG_en -DLOCALE_DESC="\"en\"" -DPKGLIBDIR="\"/usr/local/lib/arj\"" -D_UNIX -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -fstack-protector-strong  -s gnu/stripgcc.lnk -o freebsd12.0/en/rs/tools/msgbind ./freebsd12.0/en/rs/tools/filemode.o ./freebsd12.0/en/rs/tools/msgbind.o ./freebsd12.0/en/rs/tools/arjdata.o ./freebsd12.0/en/rs/tools/crc32.o 
./freebsd12.0/en/rs/tools/msgbind ./resource/resource.txt msg_crp UNIX s en ./freebsd12.0/en/rs
gmake[3]: *** [GNUmakefile:258: freebsd12.0/en/rs/msg_crp.h] Abort trap
gmake[3]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
gmake[2]: *** [GNUmakefile:169: all] Error 2
gmake[2]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/archivers/arj
*** Error code 1

Stop.
make: stopped in /usr/ports/archivers/arj
Comment 10 Walter Schwarzenfeld freebsd_triage 2019-08-08 14:03:02 UTC
msgbind.c:452:50: warning: if statement has empty body [-Wempty-body]
  if(argv[6][strlen(argv[6])-1]!=PATHSEP_DEFAULT);
                                                 ^
msgbind.c:452:50: note: put the semicolon on a separate line to silence this warning
1 warning generated.

Do what it want. Try to =>  put the semicolon on a separate line.

(althrough it is a warning, I remember a case, this simple thing "was it").
Comment 11 Walter Schwarzenfeld freebsd_triage 2019-08-08 14:26:37 UTC
What says MAKE_JOBS_UNSAFE=yes?
Comment 12 Walter Schwarzenfeld freebsd_triage 2019-08-08 14:32:08 UTC
(In reply to Renato Botelho from comment #4)
Btw, remove this
WITH_PKGNG=yes

it is not needed anymore.
Comment 13 Renato Botelho freebsd_committer 2019-08-08 14:43:01 UTC
(In reply to Walter Schwarzenfeld from comment #10)
Actually, looking at the code I noted that ; shouldn't be there since the block looks like:

  if(argv[6][strlen(argv[6])-1]!=PATHSEP_DEFAULT);
  {
   strcat(target_i, pathsep);
   strcat(target_n, pathsep);
   strcat(target_f, pathsep);
   strcat(target_h, pathsep);
  }

I'm testing a patch to fix it.
Comment 14 Renato Botelho freebsd_committer 2019-08-08 14:46:59 UTC
Created attachment 206371 [details]
Fix attempt

Can you please try attached patch?
Comment 15 Peter Putzer 2019-08-08 17:08:49 UTC
(In reply to Renato Botelho from comment #14)

I did, that fixed the warning, but unfortunately not the abort trap:

/usr/local/libexec/ccache/world/cc -DLOCALE=LANG_en -DLOCALE_DESC="\"en\"" -DPKGLIBDIR="\"/usr/local/lib/arj\"" -D_UNIX -O3 -pipe -funroll-loops -march=native  -fstack-protector-strong -fno-strict-aliasing  -fstack-protector-strong  -s gnu/stripgcc.lnk -o freebsd12.0/en/rs/tools/msgbind ./freebsd12.0/en/rs/tools/filemode.o ./freebsd12.0/en/rs/tools/msgbind.o ./freebsd12.0/en/rs/tools/arjdata.o ./freebsd12.0/en/rs/tools/crc32.o 
./freebsd12.0/en/rs/tools/msgbind ./resource/resource.txt msg_crp UNIX s en ./freebsd12.0/en/rs
gmake[3]: *** [GNUmakefile:258: freebsd12.0/en/rs/msg_crp.h] Abort trap
gmake[3]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
gmake[2]: *** [GNUmakefile:169: all] Error 2
gmake[2]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'


I've tried MAKE_JOBS_UNSAFE=yes and disabling ccache, but neither has any effect on the result.
Comment 16 Walter Schwarzenfeld freebsd_triage 2019-08-08 17:18:39 UTC
 MAKE_JOBS_UNSAFE=yes has only the sense to mostly show more errors (hidden before in other threads).

Please, post build.log.
Comment 17 Walter Schwarzenfeld freebsd_triage 2019-08-08 17:20:00 UTC
Sorry, you posted one before.
Comment 18 Walter Schwarzenfeld freebsd_triage 2019-08-08 17:41:58 UTC
(In reply to Peter Putzer from comment #15)
-O3 -pipe -funroll-loops -march=native still in the code, please put them out (/etc/make.conf).
Comment 19 Peter Putzer 2019-08-08 18:15:35 UTC
(In reply to Walter Schwarzenfeld from comment #18)

It's in again, as that didn't make a difference. See comment #9 for a partial build log without it.
Comment 20 Walter Schwarzenfeld freebsd_triage 2019-08-08 18:25:25 UTC
Renato look at the error:

gmake[3]: *** [GNUmakefile:258: freebsd12.0/en/rs/msg_crp.h] Abort trap
gmake[3]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'
gmake[2]: *** [GNUmakefile:169: all] Error 2
gmake[2]: Leaving directory '/var/ports/usr/ports/archivers/arj/work/arj-3.10.22'

and now the error of bug #239233:


gmake[3]: *** [GNUmakefile:258: freebsd12.0/en/rs/msg_crp.h] Abort trap
gmake[3]: Leaving directory '/var/ports/basejail/usr/ports/archivers/arj/work/arj-3.10.22'
gmake[2]: *** [GNUmakefile:169: all] Error 2
gmake[2]: Leaving directory '/var/ports/basejail/usr/ports/archivers/arj/work/arj-3.10.22'
*** Error code 1

ports r506777 shows:


Version 17 of debian patches is not available anymore.  Upgrade it to use
version 21 and fix the build

Maybe, it is a similar problem?