Skip to content

compiling mime-roundtrip exhausts virtual memory on mips #381

Open

Description

@infinity0

I'm trying to build cpp-netlib on mipsel and it's running out of address space:

[ 67%] Building CXX object libs/mime/test/CMakeFiles/mime-roundtrip.dir/mime-roundtrip.cpp.o
cd /home/infinity0/cpp-netlib/obj-mipsel-linux-gnu/libs/mime/test && /usr/bin/c++   -DBOOST_NETWORK_ENABLE_HTTPS -DBOOST_TEST_DYN_LINK -g -O2 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2  -Wall -I/home/infinity0/cpp-netlib    -o CMakeFiles/mime-roundtrip.dir/mime-roundtrip.cpp.o -c /home/infinity0/cpp-netlib/libs/mime/test/mime-roundtrip.cpp
virtual memory exhausted: Cannot allocate memory

This is virtual memory address space, so we can't just "throw more memory" at it. So this will affect the real builds as well. Unfortunately Debian does not have 64-bit mips userland at this time.

Do you see any obvious/easy ways for reducing the memory usage of that build command?

Activity

  1. infinity0 commented on Feb 9, 2014

    @infinity0
    Author

    Pinging @mclow as I understand you're the author of this part.

  2. infinity0 commented on Aug 19, 2014

    @infinity0
    Author

    This was reported as https://bugs.debian.org/754258 and fixed by adding --param ggc-min-expand=20 as compiler flags. In theory cpp-netlib could add this to the CMake build too.

  3. mclow commented on Aug 19, 2014

    @mclow

    That sounds reasonable to me

  4. deanberris commented on Aug 20, 2014

    @deanberris
    Member

    +1 to @mclow -- @infinity0 do you mind sending a pull request to 0.11-devel in time for the next release (which should happen at the end of this week)?

  5. deanberris commented on Sep 1, 2014

    @deanberris
    Member

    Ping @infinity0 -- Do you think this is OK to close, or will you try and send something that could make it into 0.11-devel and thus part of 0.11.1?

  6. infinity0 commented on Sep 1, 2014

    @infinity0
    Author

    i don't think i will get around to it myself this week, but could leave the issue open?

  7. deanberris commented on Sep 1, 2014

    @deanberris
    Member

    That's fine, thanks @infinity0 -- it looks like there's a few more things that need to be fixed by me anyway for 0.11.1RC1 which should happen by end of week, but I have no illusions that that would be the final RC. :)

  8. added this to the 0.11.1 milestone on Sep 1, 2014
  9. infinity0 commented on Sep 14, 2014

    @infinity0
    Author

    This is apparently non-trivial to do in CMake so I'll skip it for now.

    http://stackoverflow.com/questions/11944060/how-to-detect-target-architecture-using-cmake

  10. infinity0 commented on Sep 14, 2014

    @infinity0
    Author

    Another option is to unconditionally add set (CMAKE_CXX_FLAGS "--param ggc-min-expand=20") to mime's CMakeLists.txt. It works on my computer but I've not tested it with others. Up to you guys.

  11. infinity0 commented on Sep 14, 2014

    @infinity0
    Author

    On second thoughts, probably better to use set_source_files_properties( mime-roundtrip.cpp PROPERTIES COMPILE_FLAGS "--param ggc-min-expand=20" ) so it's just for that one file.

  12. deanberris commented on Sep 15, 2014

    @deanberris
    Member

    I'm happy with just setting the properties on the single file if that's that only one causing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions