performancecopilot/pcp

Mac Install package does not include pmwebd?

southwolf opened this issue · 10 comments

I installed PCP using the pcp-3.10.0-1.dmg, but there is no pmwebd installed, making me unable to use webapi. Do I have to compile from source? Thank you.

Yes, currently the only solution would be to compile from source - the build needs to find an installed libmicrohttpd library, which isn't there by default on Mac OS X. We could add a static library into the build environment for the pre-built dmg files we ship with PCP releases - I'll look into that.

installing libmicrohttpd gets me closer, but now I get the following:

g++ -fPIC -no-cpp-precomp -fno-strict-aliasing -arch i386 -arch x86_64 -fstack-protector-all -D_FORTIFY_SOURCE=2 -I/usr/local/Cellar/libmicrohttpd/0.9.38/include  -Wextra  -Wall -O2 -g -DPCP_DEBUG -DPCP_VERSION=\"3.10.4\" -I../../src/include -I../../src/include/pcp   -c pmgraphite.cxx -o pmgraphite.o
pmgraphite.cxx:969:17: error: use of undeclared identifier 'isnanf'
            if (isnanf (last_value) || isnanf (this_value)) {

@JohnMorales this patch should solve that build problem - can you confirm? thanks
http://www.pcp.io/pipermail/pcp/2015-April/006964.html

Fixed the compile, but won't link, it's looking for the 386 version, not sure what configure flag I need to get it to compile a 64 bit version.

I tried ./configure --with-64bit with no success:

ld: warning: ignoring file /usr/local/Cellar/libmicrohttpd/0.9.38/lib/libmicrohttpd.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/Cellar/libmicrohttpd/0.9.38/lib/libmicrohttpd.dylib
Undefined symbols for architecture i386:
  "_MHD_add_response_header", referenced from:
      mhd_notify_error(MHD_Connection*, int) in main.o

I'm guessing a bit here, but I think the PCP build generates universal (i386+x86_64) binaries, and you may be linking a libmicrohttpd that is x86_64 only. Where did your microhttpd library come from? (not sure if there's a way to check if its built "universal", off the to of my head)

OK, reproduced it locally - it is indeed the universal binary issue. You can dodge this bullet by modifying two PCP build files - src/include/builddefs.in and src/include/buildrules - look for the references to "-arch i386". If you remove those (leaving the -arch x86_64), then do a make clean, then rebuild everything, you should get a build that completes.

BTW, just found that in the libmicrohttpd sources (http://ftp.gnu.org/gnu/libmicrohttpd/) there is a note in the INSTALL file about how to build the library as a Universal binary on Mac OS X.

ftp://ftp.pcp.io/projects/pcp/download/mac/pcp-3.10.4-2.dmg includes pmwebd with a static-linked libmicrohttpd.

The -2 package is reported to be working fine.

I installed pcp on mac os x using pcp-3.11.9-1.pkg and Im having the same problem.