I want to build a command-line tool in Free Pascal for run in a SUSE 9.
This is a production server, and it is hard get approved to install anything apart from this tool.
I code on Mac OS X Leopard and wonder if is possible cross-compile from here to Linux?
The server run on Xeon.
Success! If you install Fink and then say
sudo fink install fpc-i386-linux
it will install Free Pascal and everything you need to cross compile. You will then be able to say
/sw/bin/fpc -Tlinux hw.pas
and get a Linux executable.
Unless there are cross-compilation options I can't find, you're probably out of luck doing it directly from Mac OS X. However, you can get what you want by installing a virtual machine like Parallels or Sun's VirtualBox, installing SUSE on it, and compiling there.
There are now .dmg files of Free Pascal (binary, source, and Lazarus) available for install, so it should be easy to install, open, and compile it. Note, though, that if it links to Linux-specific .so files, that they may need to be installed on Mac OS X, or you will have to change the code not to use them.
FPC can crosscompile pretty well in general. There are limitations though:
Crosscompiling from a non x86/x86_64 architecture to x86/x86_64 won't work. It requires extended, which isn't emulated on other archs. However you seem to use an intel OS X machine (not PPC), so that doesn't apply.
Depending on the libraries used and the nature of the target platforms you might need to have target-libraries on host. (in general: not for windows, but you will have to for *nix/OS X as target)
See also http://www.stack.nl/~marcov/buildfaq.pdf it contains some background on crosscompiling with FPC.
Related
I am trying to set up a cross-compile environment on an AWS EC2 Ubuntu box targeting Nvida Xavier devices on Cuda 10.2. I tried following the "instructions" at https://docs.nvidia.com/cuda/archive/10.2/cuda-installation-guide-linux/index.html#cross-platform which say to install
sudo dpkg -i cuda-repo-cross-<identifier>_all.deb
but no clue as to where I might get hold of that .deb file, or what <identifier> should be replaced with. I have installed the native package cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb and there are a load of .deb files in /var/cuda-repo-10-2-local-10.2.89-440.33.01, but none of them are that one.
So it turns out that the instructions that can be found by googling for, for instance, "cuda install cross compile" are wrong, or at least so incomplete as makes no difference.
Instead, use the SDK manager https://developer.nvidia.com/nvidia-sdk-manager to install just the host tools. It does run without a GUI.
I am using Conda on Ubuntu 16.04. My objective is to associate each Conda environment to a specific version of CUDA / cuDNN. I had a look around and I found this interesting article, which basically suggests to put different CUDA versions into different folders and then use an environment-specific bash script (run when the environment is activated) to properly set the PATH/LD_LIBRARY_PATH variables (which creates the association with the CUDA version).
This is fine, but when I try to install frameworks such as pytorch using Conda, it forces me to install also the "cudatoolkit" package.
So, a couple of questions:
1) does downloading cudatoolkit mess up my previous CUDA configurations? which version will be used?
2) if using Conda is possible to install "cudatoolkit" and also "cudnn", why not just using conda for everything? Why even needing to apply the instructions of the above mentioned article?
Thank you.
As an answer to the first question, no, downloading and installing another CUDA toolkit won't mess up other configurations. From CUDA toolkit installer, you specify an installation directory, so just pick whatever works for you that is unique to that CUDA version. This won't affect any currently installed CUDA versions. A Pytorch install will look for a CUDA_HOME environment variable as well as in '/usr/local/cuda' (the default CUDA toolkit install dir.), so it's just this environment variable that needs to be changed.
I can't speak for the second part. Perhaps the installation using Conda will use the default installation directory for the CUDA toolkit (seems silly but this is just speculation).
I would like to install MUMPS database in Windows 8.1. I was trying to install but there is no exe file for MUMPS database. Can anyone give me a hand?. I downloaded a lot of files from this site https://sourceforge.net/projects/mumps/files/ but still don't know where to start.
From the README for that project, you'll need to install Cygwin:
NOTES on cygwin
For Windows, install the Cygwin environment at http://cygwin.com/install.html
Run cygwin terminal (on win7 or win8 run it as administrator).
Setup the Cygserver using /usr/bin/cygserver-config.
edit /usr/include/cygwin/shm.h
add near end
#define SHM_R (IPC_R)
#define SHM_W (IPC_W)
edit /usr/include/cygwin/ipc.h
move third last #endif 3 lines up
Once you have Cygwin setup, the mumps.exe file available to download at the link you provide should run.
That said, I would agree with Evgeny in recommending you try the free evaluation version of InterSystems Caché. It is a far more accessible Mumps implementation for Windows and it has an extensive set of libraries for common functionality.
I am thinking about installing Mercurial and TortoiseHG for our redhat linux server. I found out there are many package versions. I searched online and found out some people encounter incompatible problems when they install Mercurial and TortoiseHG. If anyone has successfully install TortoiseHG and Mercurial, may I know what versions you used for TortoiseHG and Mercurial ?
I used command "cat /etc/redhat-release" to find the version of my linux is"
Red Hat ENterprise Linux CLient release 5.3 (Tikarga) and the bits number is "x86_64". Python is version 2.4.3. I do not need to use the latest version as long as they are stable and compatible.
Thank you very much,
TortoiseHG is mainly known for being a Windows shell extention, but there also seems to be a Linux version.
Take a look at the description on the web site (I made the important parts bold):
TortoiseHg is a Windows shell extension and a series of applications for the Mercurial distributed revision control system. It also includes a Gnome/Nautilus extension and a CLI wrapper application so the TortoiseHg tools can be used on non-Windows platforms.
and:
Supported Platforms
Microsoft Windows XP, Vista, Windows 7
Command line support via thg
Mac OS X port via source install
Gnome/Nautilus integration
Note the link in the second part.
Plus, there are non-Windows versions on the download page.
There is also this section in the release notes which describes which TortoiseHG version should be used with which Mercurial version if you have to install from source (which seems to be the case whan you're using Linux, as I understood it).
EDIT:
Sorry, but I have absolutely no clue about Linux, so I can't help you about the installation. What I can tell you is that msi files are usually Windows installer files.
As I said, I have no clue about Linux, but I can hardly imagine that you can get a Windows installer to work on Linux.
Where exactly did you see the TortoiseHG packages? The Nautilus link I posted above doesn't have any msi downloads (or I don't see them). The only msi downloads that I can find are the Windows-only downloads on the download page.
I'm working on OS X 10.6.4. I've been using clbuild to install supporting libraries for SBCL (including clsql), and I do all my work through Aquamacs. I installed MySQL using the excellent instructions over at Hive Logic. But when I call (require 'clsql) -- which seems to work fine -- and then try to execute (clsql:connect '(nil "lisp" "root" "") :database-type :mysql) to connect to my local running database, I get this error message:
erred while invoking #<COMPILE-OP (:VERBOSE NIL) {12096109}> on
#<CLSQL-MYSQL-SOURCE-FILE "clsql_mysql" {1208E071}>
[Condition of type ASDF:OPERATION-ERROR]
From my research of this problem, I think it comes from me not having a compiled version of the libmysqlclient.dylib file, of which I have a copy in /usr/local/mysql/lib/, but I'm not clear on how to go about compiling it. This forum post seems to say that's exactly what I need to do, but there's no make file in that directory.
Nowadays, you should use homebrew for MySQL installation on Snow Leopard. Homebrew installs MySQL 5.5.10 which doesn't have the compiler problem that 5.5.8 had (AFAIK).
I would guess you can download mysql-5.5.8-osx10.6-x86_64.dmg from http://dev.mysql.com/downloads/mysql/#downloads
I would expect that to include the precompiled client libs. I haven't tried it though.
If it really doesn't have the precompiled client libs, you'll probably need to download the MySQL source code from the same place (select "Source Code" from the "Select Platform" dropdown box) and compile it. Even though the description says "Generic Linux" I think mysql-5.5.8.tar.gz should work.
Having previously installed MySQL 5.0 on Leopard, I am sure it came with the client libs, but of course something could have changed. It just seems unlikely they would not provide them.
EDIT:
After installing the version for OS X 10.5, this is what I find in terms of client libs:
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient.16.dylib
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient.a
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient.dylib
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient_r.16.dylib
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient_r.a
/usr/local/mysql-5.5.8-osx10.5-x86_64/lib/libmysqlclient_r.dylib
so they are indeed installed along with the server.