Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7070025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:30:58+00:00 2026-05-28T05:30:58+00:00

I wrote a some code as a package. When I try to issue a

  • 0

I wrote a some code as a package. When I try to issue a R CMD install mypkg it gives errors such as

* installing to library ‘/Users/USERNAME/R/x86_64-apple-darwin11.0.0-library/2.14’
* installing *source* package ‘mypkg’ ...
** libs
*** arch - x86_64
make: Nothing to be done for `all'.
installing to /Users/USERNAME/R/x86_64-apple-darwin11.0.0-library/2.14/mypkg/libs/x86_64
** R
** preparing package for lazy loading
** help
Warning: /Users/USERNAME/temp/mypkg/man/mypkg-package.Rd:31: All text must be in a section
Warning: /Users/USERNAME/temp/mypkg/man/mypkg-package.Rd:32: All text must be in a section
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
R(57533) malloc: *** error for object 0x1110005e0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
sh: line 1: 57533 Abort trap: 6           '/opt/local/lib/R/bin/R' --no-save --slave < /var/folders/2f/kxqs800n6rq09nrm8_t637g40000gr/T//Rtmp6McNDz/filee0b91bc7fa41
ERROR: loading failed
* removing ‘/Users/USERNAME/R/x86_64-apple-darwin11.0.0-library/2.14/mypkg’

To figure this out, I tried to run R CMD with gdb, but to no avail

$ R -d gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov  3 21:59:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ...
(gdb) start CMD install mypkg
<-gdb intro ->
Breakpoint 1 at 0x100000ef4: file Rmain.c, line 30.
Starting program: /opt/local/lib/R/bin/exec/x86_64/R CMD install mypkg
Breakpoint 1, main (ac=4, av=0x7fff5fbff9a8) at Rmain.c:30
30      R_running_as_main_program = 1;
(gdb) c
Continuing.
ARGUMENT 'CMD' __ignored__

ARGUMENT 'install' __ignored__

ARGUMENT 'mypkg' __ignored__

Reading symbols for shared libraries . done

R version 2.14.1 (2011-12-22)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin11.0.0/x86_64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
> 

Similarly, R -d gdb CMD install mypkg and R CMD install mypkg -d gdb also do not work. My questions are:

  1. How do I run R CMD install under gdb?
  2. Is there another way to debug this error other than in gdb?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:30:59+00:00Added an answer on May 28, 2026 at 5:30 am

    The error doesn’t happen in INSTALL itself, it happens when loading your package, so you can simply run

    R CMD INSTALL --no-test-load mypkg
    R -d gdb
    > library(mypkg)
    

    As for debugging, another useful tool for memory issues is valgrind.

    But note that your package is dirty, so you should consider cleaning it and using R CMD build mypkg && R CMD INSTALL --no-test-load mypkg_x.y.tar.gz instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote some code with a lot of recursion, that takes quite a bit
I wrote some code recently (ISO/ANSI C), and was surprised at the poor performance
I wrote some code to read a file in my Java Servlet class. (I'm
I just wrote some code to test the behavior of std::equal, and came away
I'm very new to C#. My boss asked me to wrote some code using
I wrote some naive code(in the sense that it's synchronous calls) for a tableview
I recently wrote some javascript code that filled a drop down list based on
Recently a co-worker of mine wrote in some code to catch a null pointer
I want to reuse some code I wrote to add some functionality to a
I wrote some CSS in my HTML code to create rollover buttons. Then i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.