Skip to content

Build on MacOs (10.9) #2

Closed
Closed

Description

@dcoeurjo

the project does not compile on MacOs (maverick 10.9).

(as traced in the cmake output, the compiler is Clang 5.0)

Activity

  1. ghost assigned on Jan 15, 2014
  2. dmah42 commented on Jan 15, 2014

    @dmah42
    Member

    The first error is fixed as of 4e21f5e.

    The second error is curious as State is a friend so should be able to access the private member (and can in my non-clang Linux build).

  3. dcoeurjo commented on Jan 15, 2014

    @dcoeurjo
    ContributorAuthor
  4. dmah42 commented on Jan 16, 2014

    @dmah42
    Member

    This is really useful, thank you. I don't have an OSX machine to test on right now.

    I just pushed commit c44662e that should help with some (or all) of those errors. Please let me know.

  5. dcoeurjo commented on Jan 16, 2014

    @dcoeurjo
    ContributorAuthor

    Few warnings that are reported as "errors" (thanks to -Werror option):

    /Users/davidcoeurjolly/local/src/benchmark/src/sysinfo.cc:74:8: error: unused variable 'saw_mhz' [-Werror,-  Wunused-variable]
    bool saw_mhz = false;
    

    and

     14%] Building CXX object CMakeFiles/benchmark.dir/src/sysinfo.cc.o
     /Users/davidcoeurjolly/local/src/benchmark/src/sysinfo.cc:47:9: error: unused function 'EstimateCyclesPerSecond' [-Werror,-Wunused-function] 
     int64_t EstimateCyclesPerSecond() {
               ^
     /Users/davidcoeurjolly/local/src/benchmark/src/sysinfo.cc:55:6: error: unused function 'ReadIntFromFile' [-Werror,-Wunused-function]
     bool ReadIntFromFile(const char* file, int* value) {
           ^ 
     2 errors generated.
    

    Beside this warnings, there is no more build errors ;)

  6. dcoeurjo commented on Jan 16, 2014

    @dcoeurjo
    ContributorAuthor

    BTW, it'd be better to have the binary and libs compiled in the current cmake build directory rather than in the source tree (bin/, libs/).

    I'm running the benchmark_test

  7. dcoeurjo commented on Jan 16, 2014

    @dcoeurjo
    ContributorAuthor

    I've run the benchmark test and it's a bit weird: the process uses only 5% of my CPU and does nothing to the std:err.

    in this example, I've let it run 16min (wall clock) and then kill it with CTRL-C

    time benchmark_test
    Reading /proc/self/cputime_ns failed. Using getrusage().
    ^C
    benchmark_test  11,04s user 40,18s system 5% cpu 16:21,84 total
    
  8. dmah42 commented on Jan 16, 2014

    @dmah42
    Member

    Commit e2633b9 has the warning(error) fixes.

    If you want to submit a patch for cmake i'm happy to take it. The idea is that it should be creating bin and lib in the project root so you have bin, lib, include, src in the project root. Are you seeing something different?

    There may be a runtime issue with osx that i don't know about.. it sounds like either one of the clocks isn't ticking or there's a thread issue. I'll try to get an osx test machine going to check it out.

  9. dcoeurjo commented on Jan 17, 2014

    @dcoeurjo
    ContributorAuthor

    I'll prepare a pull-request for the cmake stuff.

    (And no idea for the OS issue ;))

  10. dcoeurjo commented on Feb 5, 2014

    @dcoeurjo
    ContributorAuthor

    I've just updated my working copy and the current release works perfectly on MacOS ! ;)

    I'm closing this issue and I've also push a pull-request with some cmake edits (make install).

  11. added a commit that references this issue on Nov 10, 2018
  12. added a commit that references this issue on May 17, 2021
  13. added 2 commits that reference this issue on Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions