I have searched high and low for a solution. I have both linecache19 and ruby_core_source installed.
Neither of these commands will work:
gem install ruby-debug19
gem install ruby-debug19 -- --with-ruby-include=/Users/benjohnson/.rvm/src/ruby-1.9.1-p378
Here is the error I keep getting:
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug19:
ERROR: Failed to build gem native extension.
/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... no
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... yes
checking for iseq.h... yes
checking for insns.inc... yes
checking for insns_info.inc... yes
checking for eval_intern.h... yes
creating Makefile
make
gcc -I. -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/i386-darwin10.4.0 -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby/backward -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1 -I. -DHAVE_VM_CORE_H -DHAVE_ISEQ_H -DHAVE_INSNS_INC -DHAVE_INSNS_INFO_INC -DHAVE_EVAL_INTERN_H -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby-1.9.1-p378 -fno-common -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o breakpoint.o -c breakpoint.c
gcc -I. -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/i386-darwin10.4.0 -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby/backward -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1 -I. -DHAVE_VM_CORE_H -DHAVE_ISEQ_H -DHAVE_INSNS_INC -DHAVE_INSNS_INFO_INC -DHAVE_EVAL_INTERN_H -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby-1.9.1-p378 -fno-common -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o ruby_debug.o -c ruby_debug.c
ruby_debug.c: In function ‘ruby_method_ptr’:
ruby_debug.c:141: error: ‘rb_method_entry_t’ undeclared (first use in this function)
ruby_debug.c:141: error: (Each undeclared identifier is reported only once
ruby_debug.c:141: error: for each function it appears in.)
ruby_debug.c:141: error: ‘method’ undeclared (first use in this function)
ruby_debug.c:142: warning: implicit declaration of function ‘rb_method_entry’
ruby_debug.c: In function ‘debug_event_hook’:
ruby_debug.c:719: error: ‘rb_method_entry_t’ undeclared (first use in this function)
ruby_debug.c:719: error: ‘me’ undeclared (first use in this function)
make: *** [ruby_debug.o] Error 1
Gem files will remain installed in /Users/benjohnson/.rvm/gems/ruby-1.9.1-p378/gems/ruby-debug-base19-0.11.24 for inspection.
Results logged to /Users/benjohnson/.rvm/gems/ruby-1.9.1-p378/gems/ruby-debug-base19-0.11.24/ext/ruby_debug/gem_make.out
I have had the same issue (on 1.9.1 and 1.9.2). Even trying to install 0.11.23 triggered the error. I found that it was necessary to:
Uninstall the gem (all versions for me):
gem uninstall ruby-debug-base19
Delete the 0.11.24 directory (in my case: ~/.rvm/gems/ruby-1.9.2-p0/gems/ruby-debug-base19-0.11.24/)
install 0.11.23 explicitly:
gem install ruby-debug-base19 --version=0.11.23
This is where I got most of the solution: http://rails.brentsowers.com/2010_08_01_archive.html
Additionally, if you use Bundler:
I had problems until I upgraded to latest Bundler (1.0.2 => 1.0.7) as it insisted on installing ruby-debug-base19 v 0.11.24).
In your Gemfile, make sure you've pinned the version of ruby-debug-base19:
gem "ruby-debug-base19", "0.11.23", :require => nil
This one works best for me, because it don't seems too hackish:
gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-head/
don't forget to set $rvm_path.
In my case, the last folder was ruby-1.9.3-head - pick the right one for you.
got this answer from here: ruby-debug install error: failed to build gem native extension
on Debian/Ubuntu/Mint this issue could be solved by installing some of these packages (I'm not sure which is causing the problem)
apt-get install libcurl4-openssl-dev libgcrypt11-dev libgnutls-dev
libidn11-dev libldap2-dev librtmp-dev libtasn1-3-dev m4
Do you have gcc installed and path to gcc.exe referenced in your PATH environment variable?
This solved similar problem for me, probably this could your solution too!
For the version of ruby I was working with I had to add both of these lines to my Gemfile
gem 'ruby-debug-base19', '0.11.23'
gem "ruby-debug19"
Related
Does anyone know how to solve this problem?
pyenv build fails. Trying to integrate spark scala with jupyter notbook as described hereenter link description here
➜ ~ pyenv install 3.8.2
python-build: use openssl#1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.8.2.tar.xz...
-> https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz
Installing Python-3.8.2...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
^D
BUILD FAILED (OS X 11.2.1 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/_v/qvsxvlw51rxb43z929hyv45w0000gn/T/python-build.20210222233923.72853
Results logged to /var/folders/_v/qvsxvlw51rxb43z929hyv45w0000gn/T/python-build.20210222233923.72853.log
Last 10 log lines:
extern int _NSGetExecutablePath(char* buf, uint32_t* bufsize) __OSX_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_2_0);
^
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/quais/.pyenv/versions/3.8.2/include -I/usr/local/opt/readline/include -I/usr/local/opt/readline/include -I/Users/quais/.pyenv/versions/3.8.2/include -DPy_BUILD_CORE_BUILTIN -DPy_BUILD_CORE_BUILTIN -I./Include/internal -c ./Modules/posixmodule.c -o Modules/posixmodule.o
./Modules/posixmodule.c:9197:15: error: implicit declaration of function 'sendfile' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret = sendfile(in, out, offset, &sbytes, &sf, flags);
^
1 error generated.
make: *** [Modules/posixmodule.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
➜ ~
Saving session...completed.
Deleting expired sessions...none found.
[Process completed]
I could solve this by getting an older version the environment. Apparently the latest version is not supported even if i have the 12+ version of Xcode
pyenv install 3.7.9
I am having an issue due to my gcc missing standard libraries.
copying blpapi/schema.py -> build/lib.macosx-10.7-x86_64-3.7/blpapi
running build_ext
building 'blpapi._internals' extension
creating build/temp.macosx-10.7-x86_64-3.7
creating build/temp.macosx-10.7-x86_64-3.7/blpapi
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/invtools/include -arch x86_64 -I/anaconda3/envs/invtools/include -arch x86_64 -I/usr/local/lib/blpapi_cpp_3.8.1.1/include -I/anaconda3/envs/invtools/include/python3.7m -c blpapi/internals_wrap.cxx -o build/temp.macosx-10.7-x86_64-3.7/blpapi/internals_wrap.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
blpapi/internals_wrap.cxx:3101:10: fatal error: 'stdexcept' file not found
#include <stdexcept>
^~~~~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
I had a different issue initially. It was something about cannot find type uint8_t. And someone suggested to delete files in: /usr/local/include/. And that causes the above now. It is because there are no standard libraries now. I installed this /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg and now I have standard lib in /usr/include. Which I copied to /usr/local/indclude/ to no avail. brew link gcc tells me:
Warning: Already linked: /usr/local/Cellar/gcc/8.2.0
To relink: brew unlink gcc && brew link gcc
How do I resolve this issue?
When I run 'sudo pip install rpy2' I get the a lot of compilation errors.
Here is the full dump of all the errors and here is an example except:
Compilation parameters for rpy2's C components:
include_dirs = ['/usr/share/R/include']
library_dirs = ['/usr/lib/R/lib']
libraries = ['R', 'pcre', 'lzma', 'bz2', 'z', 'rt', 'dl', 'm']
extra_link_args = ['-Wl,--export-dynamic', '-fopenmp']
R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
building 'rpy2.rinterface._rinterface' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/usr/share/R/include -I/usr/include/python2.7 -c ./rpy/rinterface/_rinterface.c -o build/temp.linux-x86_64-2.7/./rpy/rinterface/_rinterface.o
In file included from /usr/share/R/include/R.h:46:0,
from ./rpy/rinterface/_rinterface.h:8,
from ./rpy/rinterface/_rinterface.c:58:
/usr/share/R/include/R_ext/Memory.h:40:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int R_gc_running();
^
In file included from ./rpy/rinterface/_rinterface.h:9:0,
from ./rpy/rinterface/_rinterface.c:58:
/usr/share/R/include/Rinternals.h:831:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
const char *R_curErrorBuf();
^
In file included from ./rpy/rinterface/_rinterface.c:70:0:
/usr/share/R/include/Rinterface.h:129:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
extern void (*ptr_R_ProcessEvents)();
^
In file included from ./rpy/rinterface/_rinterface.c:79:0:
/usr/share/R/include/R_ext/Rdynload.h:32:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
typedef void * (*DL_FUNC)();
^
./rpy/rinterface/_rinterface.c:86:31: fatal error: readline/readline.h: No such file or directory
#include <readline/readline.h>
^
compilation terminated.
Some background. Previously botched the installation of ipython notebook dev version and have reverted back to the pip repository version. Not sure if that plays a role. Was able to get R magic working a little before that.
I had made sure to run 'apt-get updates', 'pip uninstall rpy2', 'apt-get purge python-rpy2 && apt-get remove python-rpy2' before attempt to re-install. To check if there was any residual files, I ran 'import rpy2' in ipython and that resulted in an module not found error (good, nothing was lingering).
Not sure where to begin troubleshooting. Advice is appreciated.
Edit: Nov 26, 2014
It worked after installing the following dependencies:
apt-get install libreadline-dev
apt-get install r-base r-base-dev python-dev python-setuptools
You need the headers for the readline library:
apt-get install libreadline-dev
I have a problem with installation of pyhunspell bindings for hunspell library in python 3.2 virtualenv. I downloaded hunspell from here. I issued ./configure and make and it run all right. I avoided however to do make install because my purpose is to install it on virtualenv on a web server, where I have no root permissions.
Thus I downloaded pyhunspell bindings and unzipped it to the directory, where hunspell is made. I modified include_dir path in setup.py by adding correct destination and applied the patch which allows to build pyhunspell with Python 3. Then I ran python setup.py install (having activated the target virtualenv before), but I got this:
$ python setupy.py install
running install
running build
running build_ext
building 'hunspell' extension
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -D_LINUX -I./src/hunspell -I/usr/include/hunspell -I/usr/include/python3.2mu -c hunspell.c -o build/temp.linux-x86_64-3.2/hunspell.o -Wall
creating build/lib.linux-x86_64-3.2
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-3.2/hunspell.o -lhunspell-1.2 -o build/lib.linux-x86_64-3.2/hunspell.cpython-32mu.so
/usr/bin/ld: cannot find -lhunspell-1.2
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
It seems that linker cannot link something because it looks for it in system path, while I didn't install the library in the system. Can someone wiser than me in the arcana of C devise any workaround to this issue?
I'll add that I have no access to the real server yet, but I know it will have the system pretty much similar to my local one (Debian 7.0 Wheezy), so I decided to give it a try before I actually log in to the server. Is it possible that the library compiled on my computer would work also on the server, assuming it would also be some (stable probably) version of Debian?
There's no need to build Hunspell. Install the Wheezy packages libhunspell-1.3-0 and libhunspell-dev. It should work with HunSpell 1.3. Just modify setup.py to use libraries = ['hunspell'].
FYI, the posted patch has a problem. It adds the methods of HunSpell as module functions. These receive the module as the first argument instead of the expected HunSpell instance. For example, if you call hunspell.spell, the process will probably segfault when it tries to use self->handle. You should fix the PyModuleDef to get rid of these mal-functions. Change line 273 of hunspell.c to use NULL instead of HunSpell_methods.
I am interested in compiling windows for Python25 support but when I
make -f Make_ming.mak gvim.exe
I get the following (_MAX_PATH undeclared):
gcc -c -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_BIG -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -DFEAT_PYTHON -I c:/Python25/include -DDYNAMIC_PYTHON -DYNAMIC_PYTHON_DLL=\"python25.dll\" -O3 -fomit-frame-pointer -freg-struct-return -s fileio.c -o gobj/fileio.o
fileio.c: In function `buf_modname':
fileio.c:5877: error:_MAX_PATH' undeclared (first use in this function)
fileio.c:5877: error: (Each undeclared identifier is reported only once
fileio.c:5877: error: for each function it appears in.)
fileio.c: In function `vim_tempname':
fileio.c:6832: error: `_MAX_PATH' undeclared (first use in this function)
make: *** [gobj/fileio.o] Error 1
Any ideas? What am I missing?
Thanks.
I don't how to fix your problem myself, but I followed this video tutorial to do exactly what you are trying and it worked like a charm:
http://showmedo.com/videotutorials/video?name=1850010&fromSeriesID=185.
If you want the Vim text editor, why are you not using the download version(s) from vim.org, etc. (gvim, Cream, Portable Gvim)
If you are trying to build Python for windows, why are you not using the current 2.6.1 or 3.0.1 from python.org?
_MAX_PATH should maybe be PATH_MAX or _PATH_MAX which is defined via stdlib.h / limits.h or sys/param.h under Linux.
Have you checked any configuration logs? Any previous compiler warnings about missing includes or undefined values? Search for PATH_MAX and PATH_MAX.
Is it just for the support of Python 2.5?
Not the answer to your question, but the easy way:
downloaded the precompiled vim.exe and gvim.exe from gooli.org (for Python 2.5 and/or 2.6)