Opened 8 years ago

Closed 5 years ago

#51739 closed defect (wontfix)

google-perftools @2.4_0 does not auto build/install libprofiler on osx EI Capitan 10.11.5

Reported by: zhangdai1992@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: chrstphrchvz (Christopher Chavez)
Port: google-perftools

Description (last modified by ryandesign (Ryan Carsten Schmidt))

When compiling with '-lprofiler' pops error below:

ld: library not found for -lprofiler


Other information that maybe useful:

  1. gcc version is 5.4.0 (MacPorts gcc5 5.4.0_0)
  2. cannot find libprofiler library in /usr/lib or /usr/local/lib and so on

Change History (7)

comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: google-perftools pprof libprofiler removed
Port: @2.4_0 removed
  1. What version of MacPorts gcc you have installed is immaterial; most ports, including google-perftools, use the compilers they specify, which is most often the version of clang provided by Xcode.
  2. MacPorts does not install files in /usr/lib or /usr/local/lib; it installs in its own prefix, which is usually /opt/local. However, I can confirm that the port does not install libprofiler.dylib in /opt/local/lib.

I do see this output from the configure phase:

checking how to access the program counter from a struct ucontext... configure: WARNING: Could not find the PC.  Will not try to compile libprofiler...

I don't know how to work around that problem.

We should try updating the port to version 2.5 which is now available from https://github.com/gperftools/gperftools/releases

comment:2 in reply to:  1 ; Changed 8 years ago by zhangdai1992@…

I made this ticket because I saw the similar problem from #21504

So I thought the MacPorts would install all dependencies the port need.

If the solution is installing the libprofiler manually, I think this ticket can be closed.

Replying to ryandesign@…:

  1. What version of MacPorts gcc you have installed is immaterial; most ports, including google-perftools, use the compilers they specify, which is most often the version of clang provided by Xcode.
  2. MacPorts does not install files in /usr/lib or /usr/local/lib; it installs in its own prefix, which is usually /opt/local. However, I can confirm that the port does not install libprofiler.dylib in /opt/local/lib.

I do see this output from the configure phase:

checking how to access the program counter from a struct ucontext... configure: WARNING: Could not find the PC.  Will not try to compile libprofiler...

I don't know how to work around that problem.

We should try updating the port to version 2.5 which is now available from https://github.com/gperftools/gperftools/releases

Last edited 8 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 in reply to:  2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to zhangdai1992@…:

I made this ticket because I saw the similar problem from #21504

So I thought the MacPorts would install all dependencies the port need.

If the solution is installing the libprofiler manually, I think this ticket can be closed.

MacPorts does install dependencies. If I understand correctly, libprofiler is not a dependency, but is a library the google-perftools port is meant to build, but in this case, it's not building it. That may be a bug that is fixed in version 2.5. We shouldn't close this ticket until we've resolved the build failure.

comment:4 Changed 7 years ago by kfsone (Oliver Smith)

libprofiler is *not* a dependency but one of the primary build artifacts.

Currently, port install gperftols or port install gperftools +x86_64 will install google perf tools *with* libprofiler; but port install gperftools +universal fails to install libprofiler.

This seems to be an upstream issue; I have the same problem if I clone the repos and try to configure/build myself with CFLAGS="-arch i386 -arch x86_64"; the resulting build does not include libprofiler (making it useless :(

  1. port install gperftools -> /opt/local/lib/libprofiler.dylib is installed, port uninstall gperftools, libprofiler.dylib is uninstalled,
  2. port install gperftools +x86_64 -> libprofiler.dylib installed, port uninstall removes,
  3. port install gperftools +universal -> no libprofiler.dylib.
Last edited 7 years ago by kfsone (Oliver Smith) (previous) (diff)

comment:5 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

The google-perftools port was obsoleted: [91258495fc/macports-ports]. Its replacement, the gperftools port, is at version 2.7. Does it resolve this issue?

comment:6 Changed 5 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:7 Changed 5 years ago by mf2k (Frank Schima)

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.