Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Trying to build BR-CAD. Cmake out of memory?

  1. #1
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Trying to build BR-CAD. Cmake out of memory?

    So I was trying to build BRL-CAD with osc build command.

    The spec file is in the branch here:
    https://build.opensuse.org/package/s...brlcad/BRL-CAD

    Some digging on "ReserveShadowMemoryRange failed while trying to map" and "Perhaps you're using ulimit -v" suggest that is could be a memory limit which building of BRL-CAD exceeds.

    Is that really a problem? How do I raise limit?
    My computer still have plenty of memory when building it.
    Maybe building BRL-CAD might not be a best choice.

    Code:
    CMake Error at misc/CMake/BRLCAD_Util.cmake:90 (_message):
    [   53s]   Could not run hostname reporting utility: ==1629==ERROR: AddressSanitizer
    [   53s]   failed to allocate 0xdfff0001000 (15392894357504) bytes at address
    [   53s]   2008fff7000 (errno: 12)
    [   53s] 
    [   53s]   ==1629==ReserveShadowMemoryRange failed while trying to map 0xdfff0001000
    [   53s]   bytes.  Perhaps you're using ulimit -v
    [   53s] 
    [   53s]   Child aborted
    [   53s] Call Stack (most recent call first):
    [   53s]   CMakeLists.txt:3035 (message)
    [   53s] 
    [   53s] 
    [   53s] -- Configuring incomplete, errors occurred!
    [   53s] See also "/home/abuild/rpmbuild/BUILD/trunk-7.30.0.74914/build/CMakeFiles/CMakeOutput.log".
    [   53s] See also "/home/abuild/rpmbuild/BUILD/trunk-7.30.0.74914/build/CMakeFiles/CMakeError.log".
    [   53s] error: Bad exit status from /var/tmp/rpm-tmp.itTTya (%build)
    [   53s] 
    [   53s] 
    [   53s] RPM build errors:
    [   53s]     Bad exit status from /var/tmp/rpm-tmp.itTTya (%build)
    [   53s] 
    [   53s] linux-edcv failed "build brlcad.spec" at Sun Feb 16 16:23:16 UTC 2020.

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,110
    Blog Entries
    15

    Default Re: Trying to build BR-CAD. Cmake out of memory?

    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Re: Trying to build BR-CAD. Cmake out of memory?

    Quote Originally Posted by malcolmlewis View Post
    Thanks for the tip, but it seems the memory constraints might not be the case.
    C++ is hard


  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,110
    Blog Entries
    15

    Default Re: Trying to build BR-CAD. Cmake out of memory?

    Hi
    When it builds locally, how much ram is it using?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Re: Trying to build BR-CAD. Cmake out of memory?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    When it builds locally, how much ram is it using?
    Hello,

    Before building my pc idle at 2.2 Gb (because Firefox and stuff) then when building it stayed at a constant of 2.2 GB with a small increase to 2.3 GB. I have 8 GB RAM in total.
    I there an option to get more info out of this error?

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,110
    Blog Entries
    15

    Default Re: Trying to build BR-CAD. Cmake out of memory?

    Hi
    Likely the %cmake macro adding some options that make it fail (a bug perhaps...), just use cmake instead.... one thing I suggest before building it just add an exit in the spec so you can go and look at what has been selected for building;

    Code:
    osc lbl | less
    
    [  218s] ------------ BRL-CAD Release 7.30.5, Build 20200217 - Release Build ------------
    [  218s] 
    [  218s]         Prefix: /opt/brlcad
    [  218s]       Binaries: /opt/brlcad/bin
    [  218s]      Libraries: /opt/brlcad/lib
    [  218s]   Manual pages: /opt/brlcad/share/man
    [  218s] Data resources: /opt/brlcad/share
    [  218s]  
    [  218s] CC       = /usr/bin/cc
    [  218s] CXX      = /usr/bin/c++
    [  218s] CFLAGS   = -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -pipe
    [  218s]            -fno-strict-aliasing -fno-common -fexceptions -m64 -g -ggdb3 -O3
    [  218s]            -fipa-pta -fstrength-reduce -fexpensive-optimizations
    [  218s]            -finline-functions -flto -fno-omit-frame-pointer -pedantic
    [  218s]            -pedantic-errors -Wall -Wextra -Wundef -Wfloat-equal -Wshadow
    [  218s]            -Wbad-function-cast -Wc++-compat -Winline -Wno-long-long
    [  218s]            -Wno-variadic-macros -Werror
    [  218s] CXXFLAGS = -std=c++11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -pipe
    [  218s]            -fno-strict-aliasing -fno-common -fexceptions -ftemplate-depth-128
    [  218s]            -m64 -g -ggdb3 -O3 -fipa-pta -fstrength-reduce
    [  218s]            -fexpensive-optimizations -finline-functions -flto
    [  218s]            -fno-omit-frame-pointer -pedantic -Wall -Wextra -Wundef
    [  218s]            -Wfloat-equal -Wshadow -Wno-inline -Wno-long-long
    [  218s]            -Wno-variadic-macros -Werror
    [  218s] LDFLAGS  = -m64 -g -ggdb3
    [  218s]  
    [  218s]  
    [  218s] Compile Tcl ........................: ON
    [  218s] Compile Tk .........................: OFF
    [  218s] Compile Itcl/Itk ...................: ON (Itcl only)
    [  218s] Compile Iwidgets ...................: OFF
    [  218s] Compile Tkhtml .....................: OFF
    [  218s] Compile tkpng ......................: OFF
    [  218s] Compile Tktable ....................: OFF
    [  218s] Compile libpng .....................: ON
    [  218s] Compile libregex ...................: ON
    [  218s] Compile zlib .......................: ON
    [  218s] Compile termlib ....................: ON
    [  218s] Compile Utah Raster Toolkit ........: ON
    [  218s] Compile openNURBS ..................: ON
    [  218s] Compile STEPcode....................: ON
    [  218s]  
    [  218s] OpenGL support (optional) ..........: OFF
    [  218s] X11 support (optional) .............: OFF
    [  218s] Qt support (optional) ..............: OFF
    [  218s] Run-time debuggability (optional) ..: ON
    [  218s]  
    [  218s] Build 32/64-bit release ............: 64BIT (Auto)
    [  218s] Build optimized release ............: ON
    [  218s] Build static libraries .............: ON
    [  218s] Build dynamic libraries ............: ON
    [  218s] Install example geometry models ....: ON
    [  218s] Generate extra docs ................: ON (html/man)
    [  218s]  
    [  218s] Elapsed configuration time: 1 minute 17 seconds
    Try;
    Code:
    %prep
    %autosetup
    
    %build
    %global _lto_cflags %{_lto_cflags} -ffat-lto-objects
    mkdir -p build
    cd build
    cmake -DBRLCAD_BUNDLED_LIBS=ON \
           -DBRLCAD_BUNDLED_LIBS=Bundled \
           -DBRLCAD_ENABLE_OPENGL=ON \
           -DBRLCAD_FLAGS_OPTIMIZATION=ON \
           -DCMAKE_INSTALL_PREFIX=/opt/brlcad \
           -DCMAKE_BUILD_TYPE="Release" \
           ..
    make %{?_smp_mflags}
    
    %install
    %cmake_install
    %fdupes -s %{buildroot}
    
    %files
    %doc AUTHORS BUGS ChangeLog CHANGES HACKING NEWS README TODO
    %license COPYING
    /opt/brlcad
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Re: Trying to build BR-CAD. Cmake out of memory?

    Thanks, it kinda build now.
    The only problem left is to put certain file to a devel package. It won't let me build if there is over 1000 of them.

    E: devel-file-in-non-devel-package (Badness: 50)
    E: lto-no-text-in-archive (Badness: 10000) What does this mean?

    The problem is there is over 10000 of these files is there a way to automate this?

    I believe I have to do something like this.

    Code:
    Name:           brlcad
    Version:        7.30.0.74914
    Release:        0
    Summary:        BRL-CAD Open Source Solid Modeling
    License:        LGPL, BSD
    Group:          Productivity/Graphics/CAD
    URL:            https://brlcad.org
    Source:         trunk-%{version}.tar.xz
    BuildRequires:  bison
    BuildRequires:  gcc-c++
    BuildRequires:  cmake
    BuildRequires:  fdupes
    BuildRequires:  flex
    BuildRequires:  make
    BuildRequires:  sed
    Requires:       %{name}-libs0 = %{version}-%{release}
    
    %description
    BRL-CAD is a powerful cross-platform open source solid modeling system
    that includes interactive geometry editing, high-performance
    ray-tracing for rendering and geometric analysis, image and
    signal-processing tools, a system performance analysis benchmark
    suite, libraries for robust geometric representation, with more than
    25 years of active development.
    
    
    %package  devel
    Summary:        Development files of %{name}
    Group:          Development/Libraries/C and C++
    
    %description devel
    This package contains libraries and header files for developing
    applications that use BRL-CAD.
    
    %prep
    %autosetup -n trunk-%{version}
    
    %build
    %global _lto_cflags %{_lto_cflags} -ffat-lto-objects
    mkdir -p build
    cd build
    cmake -DBRLCAD_BUNDLED_LIBS=ON \
           -DBRLCAD_BUNDLED_LIBS=Bundled \
           -DBRLCAD_ENABLE_OPENGL=ON \
           -DBRLCAD_FLAGS_OPTIMIZATION=ON \
           -DCMAKE_INSTALL_PREFIX=/opt/brlcad \
           -DCMAKE_BUILD_TYPE="Release" \
           ..
    make %{?_smp_mflags}
    
    %install
    %cmake_install
    %fdupes -s %{buildroot}
    
    %post -p /sbin/ldconfig
    %postun -p /sbin/ldconfig
    
    %files devel
    /opt/brlcad/include/brlcad/*.h
    /opt/brlcad/include/brlcad/analyze/*.h
    /opt/brlcad/include/brlcad/bg/*.h
    /opt/brlcad/include/brlcad/bn/*.h
    /opt/brlcad/include/brlcad/brep/*.h
    /opt/brlcad/include/brlcad/bu/*.h
    /opt/brlcad/include/brlcad/dm/*.h
    /opt/etc/etc/etc...
    
    %files
    %doc AUTHORS BUGS ChangeLog CHANGES HACKING NEWS README TODO
    %license COPYING
    /opt/brlcad
    But this seems wrong somehow. To include every combination of devel package directory is weird.

    Also, why did you use %{?_smp_mflags}
    Because spec-cleaner suggest me to use %make_build

    And what does /opt/brlcad at the very end do?

    Thanks.

  8. #8
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Re: Trying to build BR-CAD. Cmake out of memory?

    maybe something like this?

    Code:
    %{_includedir}/*.h
    %{_includedir}/*/*.h
    %{_includedir}/*/*/*.h
    %{_includedir}/*/*/*/*.h
    %{_libdir}/*.h

  9. #9
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    97

    Default Re: Trying to build BR-CAD. Cmake out of memory?

    Hmmm, no that doesn't work

  10. #10
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    28,110
    Blog Entries
    15

    Default Re: Trying to build BR-CAD. Cmake out of memory?

    Quote Originally Posted by andythe_great View Post
    Hmmm, no that doesn't work
    Hi
    Give me a few, been working today
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •