Bug 191465 - [patch] devel/libexecinfo: fix build on amd64
Summary: [patch] devel/libexecinfo: fix build on amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ion-Mihai "IOnut" Tetcu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-28 17:48 UTC by Lawrence Chen
Modified: 2014-08-16 09:04 UTC (History)
3 users (show)

See Also:


Attachments
patch file (613 bytes, patch)
2014-06-28 17:48 UTC, Lawrence Chen
eadler: maintainer-approval? (itetcu)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lawrence Chen 2014-06-28 17:48:51 UTC
Created attachment 144228 [details]
patch file

I have not had a working build of chromium since chromium-33.0.1750.152_1, all indications seemed to point to a problem with libexecinfo.  But rebuilding this dependency as well as rebuilding all dependencies of chromium did not resolve the issue.

Today, I happened to look at the toplevel Makefile for the port, and noticed the line:

    CFLAGS_amd64=    -fno-omit-frame-pointer

But, then when I rebuilt the port, this flag was not part of any of the compiles.

Somewhere in process this flag seems to get added and then vanishes.

So I patched the port's Makefile to check MACHINE_CPUARCH on whether to add this flag.

After installing this patched port, chromium-35.0.1916.153_1 started up.  Which I'm using right now :)
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2014-06-28 18:19:16 UTC
Without modification 

--- execinfo.o ---
--- objwarn ---
Warning: Object directory not changed from original /home/eitan/svn/fbsd/more/ports/devel/libexecinfo/work/libexecinfo-1.1
--- execinfo.o ---
cc  -O2 -pipe -march=corei7-avx  -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer -march=corei7-avx  -std=gnu99 -fstack-protector   -Qunused-arguments -c execinfo.c -o execinf$
.o
--- stacktraverse.So ---
cc -fpic -DPIC  -O2 -pipe -march=corei7-avx  -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer -march=corei7-avx  -std=gnu99 -fstack-protector   -Qunused-arguments -c stacktrav$
rse.c -o stacktraverse.So
--- execinfo.So ---
cc -fpic -DPIC  -O2 -pipe -march=corei7-avx  -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer -march=corei7-avx  -std=gnu99 -fstack-protector   -Qunused-arguments -c execinfo.$
 -o execinfo.So
--- stacktraverse.o ---
cc  -O2 -pipe -march=corei7-avx  -fstack-protector -fno-strict-aliasing -fno-omit-frame-pointer -march=corei7-avx  -std=gnu99 -fstack-protector   -Qunused-arguments -c stacktraverse.c -o sta
cktraverse.o
--- libexecinfo.a ---
building static execinfo library
--- libexecinfo.so.1 ---
building shared library libexecinfo.so.1
--- libexecinfo.a ---
ranlib -D libexecinfo.a
Comment 2 Lawrence Chen 2014-06-28 23:55:12 UTC
Its unfortunate that the only choices for Hardware/OS are Any/Any.

From your output I'm guessing you're on FreeBSD 10.x, since base gcc-4.2.1 neither accepts -march=corei7-avx nor -Qunused-arguments.  Pretty sure the second one is clang specific (neither gcc47 nor gcc48 recognize it.)

All my systems are (currently) 9.2-RELEASE-p9.

Without patch:
--------------
# make
===>  Found saved configuration for libexecinfo-1.1_3
===>   libexecinfo-1.1_3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by libexecinfo-1.1_3 for building
===>  Extracting for libexecinfo-1.1_3
=> SHA256 Checksum OK for libexecinfo-1.1.tar.bz2.
===>  Patching for libexecinfo-1.1_3
===>  Applying FreeBSD patches for libexecinfo-1.1_3
===>  Configuring for libexecinfo-1.1_3
===>  Building for libexecinfo-1.1_3
`Makefile' is up to date.
Warning: Object directory not changed from original /usr/ports/devel/libexecinfo/work/libexecinfo-1.1
cc  -O2 -fno-strict-aliasing -pipe -march=nocona -std=gnu99 -fstack-protector  -c stacktraverse.c -o stacktraverse.o
cc  -O2 -fno-strict-aliasing -pipe -march=nocona -std=gnu99 -fstack-protector  -c execinfo.c -o execinfo.o
building static execinfo library
ranlib libexecinfo.a
cc -fpic -DPIC  -O2 -fno-strict-aliasing -pipe -march=nocona -std=gnu99 -fstack-protector  -c stacktraverse.c -o stacktraverse.So
cc -fpic -DPIC  -O2 -fno-strict-aliasing -pipe -march=nocona -std=gnu99 -fstack-protector  -c execinfo.c -o execinfo.So
building shared library libexecinfo.so.1
===>  Staging for libexecinfo-1.1_3
===>   Generating temporary packing list
`Makefile' is up to date.
install -C -o root -g wheel -m 444   libexecinfo.a /usr/ports/devel/libexecinfo/work/stage/usr/local/lib
install -s -o root -g wheel -m 444     libexecinfo.so.1 /usr/ports/devel/libexecinfo/work/stage/usr/local/lib
install -l s libexecinfo.so.1 /usr/ports/devel/libexecinfo/work/stage/usr/local/lib/libexecinfo.so
install -C -o root -g wheel -m 444  execinfo.h /usr/ports/devel/libexecinfo/work/stage/usr/local/include
install  -o root -g wheel -m 444 /usr/ports/devel/libexecinfo/work/libexecinfo-1.1/README /usr/ports/devel/libexecinfo/work/stage/usr/local/share/doc/libexecinfo
====> Compressing man pages (compress-man)


With patch:
-----------
===>  Found saved configuration for libexecinfo-1.1_3
===>   libexecinfo-1.1_3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by libexecinfo-1.1_3 for building
===>  Extracting for libexecinfo-1.1_3
=> SHA256 Checksum OK for libexecinfo-1.1.tar.bz2.
===>  Patching for libexecinfo-1.1_3
===>  Applying FreeBSD patches for libexecinfo-1.1_3
===>  Configuring for libexecinfo-1.1_3
===>  Building for libexecinfo-1.1_3
`Makefile' is up to date.
Warning: Object directory not changed from original /usr/ports/devel/libexecinfo/work/libexecinfo-1.1
cc  -O2 -fno-strict-aliasing -pipe -march=nocona -fno-omit-frame-pointer -std=gnu99 -fstack-protector  -c stacktraverse.c -o stacktraverse.o
cc  -O2 -fno-strict-aliasing -pipe -march=nocona -fno-omit-frame-pointer -std=gnu99 -fstack-protector  -c execinfo.c -o execinfo.o
building static execinfo library
ranlib libexecinfo.a
cc -fpic -DPIC  -O2 -fno-strict-aliasing -pipe -march=nocona -fno-omit-frame-pointer -std=gnu99 -fstack-protector  -c stacktraverse.c -o stacktraverse.So
cc -fpic -DPIC  -O2 -fno-strict-aliasing -pipe -march=nocona -fno-omit-frame-pointer -std=gnu99 -fstack-protector  -c execinfo.c -o execinfo.So
building shared library libexecinfo.so.1
===>  Staging for libexecinfo-1.1_3
===>   Generating temporary packing list
`Makefile' is up to date.
install -C -o root -g wheel -m 444   libexecinfo.a /usr/ports/devel/libexecinfo/work/stage/usr/local/lib
install -s -o root -g wheel -m 444     libexecinfo.so.1 /usr/ports/devel/libexecinfo/work/stage/usr/local/lib
install -l s libexecinfo.so.1 /usr/ports/devel/libexecinfo/work/stage/usr/local/lib/libexecinfo.so
install -C -o root -g wheel -m 444  execinfo.h /usr/ports/devel/libexecinfo/work/stage/usr/local/include
install  -o root -g wheel -m 444 /usr/ports/devel/libexecinfo/work/libexecinfo-1.1/README /usr/ports/devel/libexecinfo/work/stage/usr/local/share/doc/libexecinfo
====> Compressing man pages (compress-man)
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2014-07-04 01:20:10 UTC
Over to maintainer.
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-08-16 09:02:09 UTC
A commit references this bug:

Author: eadler
Date: Sat Aug 16 09:02:05 UTC 2014
New revision: 365068
URL: http://svnweb.freebsd.org/changeset/ports/365068

Log:
  Fix bug in libexecinfo by using -fno-omit-framepointer

  PR:		191465
  Approved by:	maintainer timeout (2014-06-28)

Changes:
  head/devel/libexecinfo/Makefile
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2014-08-16 09:04:14 UTC
After a timeout I committed this patch (note: it doesn't fix my problem, but since it fixes your problems - why not?)