Environment:
$ date
Mon May 16 16:17:42 JST 2016
$
sysctl -a | blah
CPU: Genuine Intel(R) CPU XXX (XXX-MHz 686-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: XX CPUs
$
$ uname
FreeBSD
$
$ cc --version;gmake --version;cmake --version
cc (GCC) 4.2.1 20070831 patched [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
:
GNU Make 4.1
Built for i686-portbld-freebsdXXX
:
cmake version 3.4.2
:
$
Configure Log:
:
checking build system type... i386-unknown-freebsd
checking host system type... i386-unknown-freebsd
checking target system type... i386-unknown-freebsd
checking for working directories... current
using prefix '/usr/local'
checking for c compiler... gcc
checking for dynamic library... libc
checking for patch... /usr/bin/patch
checking for git... /usr/local/bin/git
checking for libmagic ... yes
Using PKGCONFIG: pkg-config
checking pkg-config flags for capstone... no
checking for libz ... yes
checking for libzip ... no
checking for libssl ... yes
Using PKGCONFIG: pkg-config
checking pkg-config flags for openssl... yes
checking for liblua5.1 ... no
creating ./config-user.mk
creating libr/include/r_userconf.h
creating pkgcfg/r_io.pc
creating pkgcfg/r_db.pc
:
creating pkgcfg/r_parse.pc
creating pkgcfg/r_fs.pc
cleaning temporally files... done
Final report:
- PREFIX = /usr
- HAVE_LIB_GMP = 0
- HAVE_OPENSSL = 0
- USE_CAPSTONE = 0
- HAVE_FORK = 1
- VERSION = 0.10.3-git
- USE_LIB_ZIP = 0
- USE_LIB_MAGIC = 0
- DEBUGGER = 1
- CC = gcc
- USERCC = gcc
- USEROSTYPE = bsd
- LIBVERSION = 0.10.3-git
- BUILD = i386-unknown-freebsd
- HOST = i386-unknown-freebsd
- TARGET = i386-unknown-freebsd
Generating r_version.h file
Update libr/include/r_version.h
CC adler32.c
CC crc32.c
:
Errors:
/PATH/radare2/libr/util/libr_util.so: undefined reference to `backtrace'
../rules.mk:73: recipe for target 'rax2' failed
gmake[2]: *** [rax2] Error 1
Makefile:14: recipe for target 'all' failed
gmake[1]: *** [all] Error 1
Makefile:47: recipe for target 'all' failed
gmake: *** [all] Error 2
Build log:
https://github.com/unixfreaxjp/dev/blob/master/r2freebsdi686.md
Suggestion:
FreeBSD incompatbility error during linking in libr/rules.mk to previously built libr/util/libr_util.so (xref: LINKFLAGS+=../../util/libr_util.a) during rax2 compilation.
Additional:
linux is unaffected, obviously.
Workaround:
Use previous build
Cc @dequis
On 16 May 2016, at 10:01, unixfreaxjp [email protected] wrote:
Environment:
$ date
Mon May 16 16:17:42 JST 2016
$
sysctl -a | blah
CPU: Genuine Intel(R) CPU XXX (XXX-MHz 686-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
$
$ uname
FreeBSD
$
$ cc --version;gmake --version;cmake --version
cc (GCC) 4.2.1 20070831 patched [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
:
GNU Make 4.1
Built for i686-portbld-freebsdXXX
:
cmake version 3.4.2
:
$
Configure Log::
checking build system type... i386-unknown-freebsd
checking host system type... i386-unknown-freebsd
checking target system type... i386-unknown-freebsd
checking for working directories... current
using prefix '/usr/local'
checking for c compiler... gcc
checking for dynamic library... libc
checking for patch... /usr/bin/patch
checking for git... /usr/local/bin/git
checking for libmagic ... yes
Using PKGCONFIG: pkg-config
checking pkg-config flags for capstone... no
checking for libz ... yes
checking for libzip ... no
checking for libssl ... yes
Using PKGCONFIG: pkg-config
checking pkg-config flags for openssl... yes
checking for liblua5.1 ... no
creating ./config-user.mk
creating libr/include/r_userconf.h
creating pkgcfg/r_io.pc
creating pkgcfg/r_db.pc
:
creating pkgcfg/r_parse.pc
creating pkgcfg/r_fs.pc
cleaning temporally files... doneFinal report:
- PREFIX = /usr
- HAVE_LIB_GMP = 0
- HAVE_OPENSSL = 0
- USE_CAPSTONE = 0
- HAVE_FORK = 1
- VERSION = 0.10.3-git
- USE_LIB_ZIP = 0
- USE_LIB_MAGIC = 0
- DEBUGGER = 1
- CC = gcc
- USERCC = gcc
- USEROSTYPE = bsd
- LIBVERSION = 0.10.3-git
- BUILD = i386-unknown-freebsd
- HOST = i386-unknown-freebsd
- TARGET = i386-unknown-freebsd
Generating r_version.h file
Update libr/include/r_version.h
CC adler32.c
CC crc32.c
:
Errors:/PATH/radare2/libr/util/libr_util.so: undefined reference to `backtrace'
../rules.mk:73: recipe for target 'rax2' failed
gmake[2]: ** [rax2] Error 1
Makefile:14: recipe for target 'all' failed
gmake[1]: ** [all] Error 1
Makefile:47: recipe for target 'all' failed
gmake: *** [all] Error 2
Build log: https://github.com/unixfreaxjp/dev/blob/master/r2freebsdi686.mdSuggestion:
Error during linking inlibr/rules.mk to previously builtlibr/util/libr_util.so(xref:LINKFLAGS+=../../util/libr_util.a) duringrax2compilation.Additional:
linux is unaffected, obviously.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
Afair he said he already fixed it. @unixfreaxjp have you tried very latest version of the sources?
Afair he said he already fixed it. @unixfreaxjp have you tried very latest version of the sources?
Thank you for the response, latest built 695d9a0..50a46a9 was used, please see: https://github.com/unixfreaxjp/dev/blob/master/r2freebsdi686.md
@unixfreaxjp try with this one https://github.com/radare/radare2/commit/49912c0226ec37178934d0be7421a4849d4f02e3
@unixfreaxjp try with this one 49912c0
Thank you. The built https://github.com/radare/radare2/commit/49912c0226ec37178934d0be7421a4849d4f02e3 was tested.
Build result: https://github.com/unixfreaxjp/dev/blob/master/r2freebsdi686-2.md OK.
Do not use backtrace if it's not available xref: https://github.com/radare/radare2/commit/49912c0226ec37178934d0be7421a4849d4f02e3
Question: So we can't backtrace in FreeBSD?
Thank you for the fix, the compilation is much more important than backtracefeature, since this issue is for build error, I am closing it.
Well, we can, but we'll need to figure out right way. It requires libexecinfo, so r2 buildsystem should check its presence.
It requires
libexecinfo,
libexecinfo was installed from /usr/ports.
$ pkg info libexecinfo
libexecinfo-1.1_3
Name : libexecinfo
Version : 1.1_3
Installed on : Mon May 16 19:41:16 2016 JST
Origin : devel/libexecinfo
Architecture : freebsd:9:x86:64
Prefix : /usr/local
Categories : devel
Licenses :
Maintainer : [email protected]
WWW : http://www.gnu.org/software/libc/manual/html_node/Backtraces.html
Comment : Library for inspecting program's backtrace
Options :
DOCS : on
Shared Libs provided:
libexecinfo.so.1
Annotations :
Flat size : 128KiB
Description :
This is a quick-n-dirty BSD licensed clone of backtrace facility found
in the GNU libc, mainly intended for porting Linuxish code to BSD
platforms, however it can be used at any platform which has a gcc
compiler.
WWW: http://www.gnu.org/software/libc/manual/html_node/Backtraces.html
Yet, it still failed in the build with same error, could be more than just detecting libexecinfoexists? no? :
../rules.mk:73: recipe for target 'rax2' failed
gmake[2]: *** [rax2] Error 1
Makefile:14: recipe for target 'all' failed
gmake[1]: *** [all] Error 1
Makefile:47: recipe for target 'all' failed
gmake: *** [all] Error 2
in this build:
$ git describe --all --long
heads/master-0-g50a46a9
I am keeping old and new https://github.com/radare/radare2/commit/49912c0226ec37178934d0be7421a4849d4f02e3 fix ones for trouble shooting..
Dammit guys, i sent this PR and you ignored it :( #4899
@dequis lol, sorry, haven't noticed it. Will reuse your approach.
Dammit guys, i sent this PR and you ignored it :( #4899
Hey, that #ifdef is a nice approach! https://github.com/radare/radare2/pull/4899/commits/0afe75258b6e59b1dff8f89b41972904fb71814e
So, which one to use? the https://github.com/radare/radare2/commit/49912c0226ec37178934d0be7421a4849d4f02e3 or https://github.com/radare/radare2/pull/4899/commits/0afe75258b6e59b1dff8f89b41972904fb71814e ?
@dequis @XVilka
All in the tree. Should be fixed for now. As for backtrace support in FreeBSD - I've created another issue.
built tested in FreeBSDx86-32 and x86-64 ; noted: without backtrace (other matter).
(in x86-32)
$ git reset --hard
HEAD is now at 49912c0 Do not use backtrace if it's not available
$ git describe --all --long
heads/master-0-g49912c0
$ git pull
remote: Counting objects: 77, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 77 (delta 61), reused 35 (delta 19), pack-reused 0
Unpacking objects: 100% (77/77), done.
From https://github.com/radare/radare2
49912c0..34cd4f6 master -> origin/master
Updating 49912c0..34cd4f6
Fast-forward
(...)
libr/util/sys.c | 9 ++--
(...)
15 files changed, 433 insertions(+), 236 deletions(-)
$ git describe --all --long
heads/master-0-g34cd4f6
$ sys/install.sh
(...)
$ r2 -v
radare2 0.10.3-git 11260 @ freebsd-x86-32 git.0.10.2-317-g34cd4f6
commit: 34cd4f62b102401a33f6c0008a8d56b8b09fca79 build: 2016-05-17
(same process in x86-64)
$ r2 -v
radare2 0.10.3-git 11262 @ freebsd-x86-64 git.0.10.2-317-g34cd4f6
commit: 34cd4f62b102401a33f6c0008a8d56b8b09fca79 build: 2016-05-17
Thank you.
?
On 17 May 2016, at 06:54, unixfreaxjp [email protected] wrote:
built tested in x86-32 and x86-64 ; noted: without backtrace (other matter).
(in x86-32)
$ git reset --hard
HEAD is now at 49912c0 Do not use backtrace if it's not available
$ git describe --all --long
heads/master-0-g49912c0
$ git pull
remote: Counting objects: 77, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 77 (delta 61), reused 35 (delta 19), pack-reused 0
Unpacking objects: 100% (77/77), done.
From https://github.com/radare/radare2
49912c0..34cd4f6 master -> origin/master
Updating 49912c0..34cd4f6
Fast-forward
(...)
libr/util/sys.c | 9 ++--
(...)
15 files changed, 433 insertions(+), 236 deletions(-)
$ git describe --all --long
heads/master-0-g34cd4f6
$ sys/install.sh
(...)
$ r2 -v
radare2 0.10.3-git 11260 @ freebsd-x86-32 git.0.10.2-317-g34cd4f6
commit: 34cd4f62b102401a33f6c0008a8d56b8b09fca79 build: 2016-05-17(same process in x86-64)
$ r2 -v
radare2 0.10.3-git 11262 @ freebsd-x86-64 git.0.10.2-317-g34cd4f6
commit: 34cd4f62b102401a33f6c0008a8d56b8b09fca79 build: 2016-05-17
Thank you.—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
?
Explanation:
This bug in compilation was fixed by @dequis @XVilka and I was testing it and now using the build, here is fix explanation.
Not much usingbacktraceanyway. So I can patiently look forward for @XVilka backtrace on BSD systems issue #4910 follow ups. Just for the notes, even libexecinfo installed I received same error..