Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 677946 - dev-util/edb-debugger-0.9.21 - src_compile(): ld.bfd: cannot find -lcapstone
Summary: dev-util/edb-debugger-0.9.21 - src_compile(): ld.bfd: cannot find -lcapstone
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Petross404(Petros S)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-14 02:01 UTC by Willard Dawson
Modified: 2019-02-21 14:45 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log.txt,194.49 KB, text/plain)
2019-02-14 02:01 UTC, Willard Dawson
Details
emerge info (emerge-info.txt,6.26 KB, text/plain)
2019-02-14 02:02 UTC, Willard Dawson
Details
emerge -pqv (emerge-pqv.txt,94 bytes, text/plain)
2019-02-14 02:03 UTC, Willard Dawson
Details
environment (environment.txt,111.20 KB, text/plain)
2019-02-14 02:04 UTC, Willard Dawson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Willard Dawson 2019-02-14 02:01:57 UTC
Created attachment 565242 [details]
build log

Possible duplicate of 673466 ...??
Comment 1 Willard Dawson 2019-02-14 02:02:48 UTC
Created attachment 565244 [details]
emerge info
Comment 2 Willard Dawson 2019-02-14 02:03:28 UTC
Created attachment 565246 [details]
emerge -pqv
Comment 3 Willard Dawson 2019-02-14 02:04:18 UTC
Created attachment 565248 [details]
environment
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-16 17:07:46 UTC
Do you have  /usr/lib/libcapstone.* files?
    $ ls /usr/lib/libcapstone.*
Which dev-libs/capstone you have installed?
Comment 5 Willard Dawson 2019-02-19 01:30:55 UTC
# ls -l /usr/lib/libcapstone.*
-rwxr-xr-x 1 root root 3832656 Aug  8  2018 /usr/lib/libcapstone.so.4

# eix dev-libs/capstone
[I] dev-libs/capstone
     Available versions:  ~3.0.5_rc2(0/3) ~3.0.5_rc2-r1(0/3) (~)4.0(0/4) (~)4.0.1(0/4) (~)4.0.1(0/4)[1] {python PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6"}
     Installed versions:  4.0.1(0/4)[1](07:23:35 AM 02/01/2019)(python)
     Homepage:            http://www.capstone-engine.org/
     Description:         disassembly/disassembler framework + bindings

[1] "pentoo" /var/lib/layman/pentoo

# equery d dev-libs/capstone
 * These packages depend on dev-libs/capstone:
dev-python/capstone-python-4.0.1 (cython ? dev-libs/capstone[python])
dev-util/edb-debugger-0.9.21 (>=dev-libs/capstone-3.0)


# eix dev-python/capstone-python 
[I] dev-python/capstone-python [1]
     Available versions:  (~)4.0.1 {cython PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6"}
     Installed versions:  4.0.1(03:53:57 AM 02/17/2019)(cython PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5")
     Homepage:            http://www.capstone-engine.org/
     Description:         A lightweight multi-platform, multi-architecture disassembly framework

[1] "pentoo" /var/lib/layman/pentoo

# eix dev-util/edb-debugger 
[I] dev-util/edb-debugger
     Available versions:  (~)0.9.21 ~1.0.0-r2 **9999 {graphviz legacy-mem-write pax_kernel}
     Installed versions:  0.9.21(04:31:58 PM 01/13/2019)(-graphviz -legacy-mem-write -pax_kernel)
     Homepage:            https://github.com/eteran/edb-debugger
     Description:         edb is a cross platform x86/x86-64 debugger, inspired by Ollydbg


brick ~ # uname -a
Linux brick 4.20.6-pentoo #2 SMP Wed Feb 6 20:31:35 EST 2019 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz GenuineIntel GNU/Linux
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-19 07:30:46 UTC
(In reply to Willard Dawson from comment #5)
> # ls -l /usr/lib/libcapstone.*
> -rwxr-xr-x 1 root root 3832656 Aug  8  2018 /usr/lib/libcapstone.so.4

Looks like you don't have /usr/lib/libcapstone.so installed.

> Installed versions:  4.0.1(0/4)[1](07:23:35 AM 02/01/2019)(python)
> [1] "pentoo" /var/lib/layman/pentoo

Try ::gentoo version.

::pentoo's version switched to cmake build system and does not pass any configuration flags:
    https://github.com/pentoo/pentoo-overlay/blob/master/dev-libs/capstone/capstone-4.0.1.ebuild

You might want to report it to ebuild owner.
Comment 7 Anton Bolshakov 2019-02-19 07:48:16 UTC
I'm unable to reproduce.

Тhere is a proper /usr/lib/pkgconfig/capstone.pc file installed by pentoo's ebuild so it should work.

> 
> ::pentoo's version switched to cmake build system and does not pass any
> configuration flags:
>    

This is not correct. We don't need to hack and overwrite any configurations since cmake will take care of it. Thus, our ebuild is "cleaner".
Comment 8 Anton Bolshakov 2019-02-19 07:51:06 UTC
(In reply to Willard Dawson from comment #5)
> # ls -l /usr/lib/libcapstone.*
> -rwxr-xr-x 1 root root 3832656 Aug  8  2018 /usr/lib/libcapstone.so.4

Willard,
that seems different from what I have:

ls -al /usr/lib/libcapstone.*
-rw-r--r-- 1 root root 14453440 Jan 12 01:30 /usr/lib/libcapstone.a
lrwxrwxrwx 1 root root       16 Jan 21 18:48 /usr/lib/libcapstone.so -> libcapstone.so.4
lrwxrwxrwx 1 root root       20 Jan 21 18:48 /usr/lib/libcapstone.so.4 -> libcapstone.so.4.0.1
-rwxr-xr-x 1 root root  4014488 Jan 12 01:30 /usr/lib/libcapstone.so.4.0.1
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-19 08:54:46 UTC
(In reply to Anton Bolshakov from comment #7)
> > ::pentoo's version switched to cmake build system and does not pass any
> > configuration flags:
> >    
> 
> This is not correct. We don't need to hack and overwrite any configurations
> since cmake will take care of it. Thus, our ebuild is "cleaner".

I don't see how it contradicts my statement. My point was that ebuilds are not equivalent because build systems are different enough.

For example on amd64 ::gentoo installs both
    usr/lib64/pkgconfig/capstone.pc
    usr/lib64/libcapstone.so
to $(get_libdir).

::pentoo ebuild does install into
    usr/lib/pkgconfig/capstone.pc
    usr/lib64/libcapstone.so

I expect it to break at least on 17.1 profiles (but not on x86 which Willard uses here). Perhaps there are more differences in system autodetection between two build systems.

Willard, please attach build logs you get from both:
    # emerge -v1 dev-libs/capstone::gentoo
    # emerge -v1 dev-libs/capstone::pentoo
We can try to figure out what is different for you.
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-19 10:30:04 UTC
Reproduced locally as well. It's enough to try to install capstone::pentoo in x86 stage3 chroot.

sf ~ # portageq envvar ARCH
x86
sf ~ # uname -m
i686
sf ~ # qlist capstone | fgrep .so
/usr/lib/libcapstone.so.4
/usr/lib64/libcapstone.so
/usr/lib64/libcapstone.so.4
/usr/lib64/libcapstone.so.4.0.1
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-19 10:34:51 UTC
lib64 comes right from here:
  https://github.com/aquynh/capstone/blob/master/CMakeLists.txt#L599

  if (NOT APPLE AND "${LIB64}" STREQUAL "TRUE")
    set(LIBSUFFIX 64)
  else()
    set(LIBSUFFIX "")
  endif()

  set(INSTALL_LIB_DIR     lib${LIBSUFFIX} CACHE PATH "Installation directory for libraries")
  mark_as_advanced(INSTALL_LIB_DIR)
Comment 12 Anton Bolshakov 2019-02-19 13:37:03 UTC
I have fixed /usr/lib64/pkgconfig/capstone.pc lib path in -r1 (https://github.com/aquynh/capstone/pull/1393). 

Let me know if you have any other clues ..
Comment 13 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-19 20:42:18 UTC
Closing as WONTFIX as it's not a ::gentoo ebuild. I suggest filing a bug directly to pentoo's overlay bugtracker at
    https://github.com/pentoo/pentoo-overlay/issues
to get faster response from direct maintainer.
Comment 14 Willard Dawson 2019-02-21 14:45:29 UTC
Apologies for my late response. Unfortunately, I was away from the computer in question this week and unable to do further testing until later this evening or this weekend. I saw an email from Anton that it is possibly fixed in Pentoo. Even though the bug is closed here as WONTFIX, I will report back for closure on the issue once I have an opportunity to try it out.