Trouble opening Ncurses Examples in OS X - configure

I recently downloaded ncurses from here and have compiled it using ./configure and make
As it is recommended in the README, I compiled the example programs that come bundled with the package. The programs compiled without any issue, but every time I run the programs I get the following errors:
Terminal type "xterm-256color"
terminals database is inaccessible
Changing the terminal's type using TERM=xterm and export TERM don't seem to solve this issue, and I'm just stuck. Will ncurses work if I included them in my C/C++ programs, or should I make sure the examples work?
Thanks in advance

Probably you did not install the terminal database, or did not tell the programs where to find it.
OSX comes with ncurses 5.7 (old, but not the problem here), with the terminal database in /usr/share/terminfo. However by default the configure script assumes you want to install in /usr/local. You can tell the programs where there's a terminal database by setting the TERMINFO environment variable, or (better), setting TERMINFO_DIRS to list both locations (with the newer one first of course).
For a start, something like
export TERMINFO=/usr/share/terminfo
should be enough to make the examples run.
Further reading:
TERMINFO
TERMINFO_DIRS

Related

Uninstalling Lua

How in the world do I get rid of Lua on my Macbook Air?
I installed the programming language just to test it out and now I am not sure how to get rid of it.
I used the official Lua website <lua.org> to install it and followed the instructions on the download page using 'curl' or whatever it is.
I am a programming beginner. Other languages, like Java and Python, don't have this issue. Can someone please help me get rid of the annoying thing? I don't need it clogging up my computer.
Lua's Makefile has an uninstall target which should allow you to remove it from your system. cd to the Lua source directory (lua-5.4.3 for the current version) and type this command:
sudo make uninstall
The sudo is required if you need administrative privileges to remove software.
(I'm not familiar with MacOS, but from the comments, it seems to work the same way as it does on GNU systems.)

Is it possible to run sdl2-config on Windows?

It seems there are several times when running the sdl2-config script bundled with SDL2 would be useful (such as checking which libraries need to be linked to). But it doesn't seem possible to run this script natively on Windows.
I'm using I've been using mingw for all my C compiling needs so far, if that helps. Is there any way I can run this script on Windows?
Yes, sure!
However, that script is just a Bash script, so you need to install Cygwin which has Bash built in. It is not recommended to use the native (Win10) port of the Bash shell, since it is not behaving as expected.
If you don't already have it installed, then the tricky part is how to install SDL2 using Cygwin. IMHO, that should probably be avoided, as it tend to cause a lot of weird problems (for other packages).
However, there is already a Cygwin package if you want to try it.
apt-cyg install mingw64-x86_64-SDL2 libSDL2-devel libSDL2_2.0_0 # etc

How to let RubyMine work with cygwin64

I'm currently using cygwin64 on my Windows 10 virtual machine. On there, I've installed rvm, and the default (and only) version of Ruby is ruby 2.4.0p0. Through my IDE (RubyMine) I've linked the ruby interpreter to the ruby interpreter installed on my cygwin64 installation. However, there are some issues i'm having which are quite annoying and I though I would ask here for anyone who might have had this issue before and fixed it some how.
The issues are:
Gems not found (requiring files are 'not found': including the standard library, methods not found, classes not found, ...)
Using cmd I cannot use commands such as bundler, gem etc (I have to use the cygwin64 terminal)
Some features on RubyMine don't work (including the Run button, etc)
I've thought about path variables, but I don't really know which ones I have to set (and where to).
Any help would be appriciated.
I managed to get some things working today and I though I might aswell share it here, for anyone having similar issues in the future. I fixed the first issue through setting up a ssh server on my cygwin64 installation and allow localhost connections to it. I then set up a 'remote interpreter' through RubyMine and linked it to the ruby interpreter through the ssh connection. Gems are found, RubyMine no longer complains about unknown files, code completion works, for me a success!
I then went searching a bit and found a alternative for the cmd not allowing commands such as bundler, gem, etc. I didn't fix it, but I managed to link the RubyMine's terminal to my cygwin64 terminal. I now can execute these commands through RubyMine, so that isn't that bad.
Setting up the remote interpreter:
File -> Settings -> Languages & Frameworks -> Ruby SDK and Gems
Linking the terminal:
File -> Settings -> Tools -> Terminal -> Shell path -> C:\cygwin64\Cygwin.bat (in my case)

setting environment variables for LLVM on OS X

I am learning to build a compiler using LLVM as back end.
I followed the steps on getting started with the LLVM system until setting up your environment
What is the specific location for [/path/to/your/bitcode/libs] ?
Was this mistake cause the command not found when I type in lli in a Terminal?
//I am trying to build a hello world to see through the total compiling procedure
You can put LLVM_LIB_SEARCH_PATH wherever you want. For now, you probably don't need to worry about it at all; as the documentation says, it is optional. Later, you may create bitcode (i.e. compiled VM code) functions which you would like to link into the bitcode your compiler produces. For example, you may need to create some kind of standard library and runtime environment for your executables.
That has nothing to do with the lli not found error, which is the result of the LLVM binaries either not having been installed, or having been installed somewhere which is not in your $PATH.
By default, the llvm package will configure itself for installation under the prefix /usr/local, which means that after you gmake install you should find lli and friends in places like /usr/local/bin/lli. That may or may not be in your $PATH; to find out, type
echo "$PATH"
and see if it has :/usr/local/bin: somewhere in it. If it doesn't, then you could change your PATH:
export PATH="/usr/local/bin:$PATH"
To make that permanent, you'll have to add it to your bash startup files.
But you might not want it to be installed there. I usually install software I'm playing with in my local directory tree, so that I don't have to sudo all the time. You can change the root of the installation directory tree with the --prefix argument to ./configure. (You have to do that before you build LLVM.) ./configure --help will provide some more information about configure options, but --prefix is certainly the most important one.
Whatever you do, don't do it blindly. Make sure you understand what this all means before doing it. If you plan on making a compiler, you'll need to understand some of the details of a typical build- and runtime- environment; PATH and configure scripts are on the unfortunately long list of things you should at least be somewhat familiar with.
As I understand it, some version of LLVM is already installed on Mac OS X, so you'll need to be careful that your installation doesn't interfere. The fact that bash is report that lli can't be found probably indicates that not all the tools are installed, which will make things less complicated.
I'm afraid that I don't really have any experience with installing LLVM on a Mac, but if you run into specific problems (like "my compiler doesn't work after I install LLVM") then you could ask a specific question with appropriate tags.

EPD Python vs System Python--OSX Mountain Lion 10.8

I'm a two week old mac user, so bear with me here. I'm trying to set EPD python up as my default python interpreter instead of the system python that came with the mac. It was my understanding that EPD does this automatically upon installation by modifying the .bash_profile, but after I installed EPD, the .bash_profile was unaltered and as far as I can see, system python is still the default interpreter. How do I go about changing this?
The major reason why I want to change the default python to EPD is that all the packages I install are automatically placed into the /Library/Python/2.7/site-packages directory instead of the site-packages directory associated with EPD. In particular, I can't get PyCuda to install in EPD's site-packages directory.
I hope this made some sort of sense. I'm lost and not sure where to go from here. Help is greatly appreciated.
Adding the line
export PATH=/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH
to your .bashrc file should work.
In theory the EPD installer should have done this job... maybe an issue with permissions?
A few additional points.
Normally the EPD installer makes the PATH changes by adding lines to the bottom of ~/.bash_profile ; if you are sure that it did not, you can also check ~/.profile .
Perhaps you installed EPD as a different user?
Since you say that you are new to Mac, I'll also mention that the PATH would not have been changed in any terminal windows that had already been opened before you installed EPD.
Also, a crucial warning: since you've already installed 3rd-party packages into your system Python, please see this article:
https://support.enthought.com/entries/22094157-OS-X-Conflict-with-installed-packages-in-earlier-Python-installation
You may also find other useful articles in that same Knowledge Base site.

Resources