I can't compile CGI project to Linux in Lazarus - linux

I installed Lazarus 1.0.10 and FCL package.
I made a CGI test program to run in my Hostgator account but when I compile it I get this error:
fcllaz.pas(0,0) Fatal: Can not find unit system used by fcllaz.
That if I configure the project to target Linux SO. If I use standard (Windows) it compiles ok, but my hostgator account is Linux.
Does anyone had that kind of problem? How to fix it?

(a.s. If you are trying to do crosscompiling, crosscompiling TO linux is an advanced topic. You are better off with installing a similar *nix system as your host in a VM)
FPC is probably not completely installed. Some Ubuntu/debian versions insist on having to do manual configuration afterwards.
Make sure that
there is a symlink of $prefix/bin/ppc386 to $prefix/lib/fpc//ppc386
make sure there is a /etc/fpc.cfg or ~/.fpc.cfg with a -Fu line in it that points
to $prefix/lib/fpc/$FPCVERSION/units/$FPCTARGET/* (in this case FPC will fill in version and target)
where $PREFIX is the prefix where you installed FPC ( typically /usr or /usr/local )
for more information see the buildfaq

Related

Cross-compilation targeting Cygwin with Linux host

Is it possible to cross-compile a program targeting a Cygwin environment from a Linux/Unix host? I'm mostly trying to avoid using a Windows WM for building a collection of programs.
From the website:
Cygwin is not:
a way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows.
mingw-w64 is not enough, I need a full POSIX platform. I'm also wondering if it's possible to target MSYS2.
Perhaps I'm not understanding correctly, and one doesn't need to compile in Cygwin but only mingw-w64 is necessary.
Thanks!
It is possible to compile for Cygwin from Linux.
The cygwin1.dll itself is built in such way.
Packages/libraries are available at:
https://copr.fedorainfracloud.org/coprs/yselkowitz/cygwin/
Of course only a minimal set of tools/libraries is available

is it possible to cross-compile from x86(x64) windows to x86(x64) linux?

I have been wonder about why x86(windows) to arm(linux) cross compile is possible but x86(windows) to x86(linux) cross compile is impossible or difficult only can use cygwin
As below link there is some cross-compiler for windows to arm from personal pc(x86), but there is no cross-compiler x86 to x86.
http://gnutoolchains.com/beaglebone/
why window(x86) to Debian(ARM) is available without cygwin , but window to Debian(x86) is difficult or must use cygwin?
Is this issue caused by POSIX size problem? The library size of Debian in ARM is little bit smaller than x86 ones?
I confuse....
I want to anyone clear to me.
Thank you for reading.
I installed WSL and then Debian as an Windows-App
directly under my Windows10 Home Edition.
Now I can open a Linux command prompt in every directory I want.
Installed g++ with apt-get (changed to root with "sudo su").
Using Mingw64 command prompt from the Git-Bash I can even use the same shell script
to compile console apps as Linux and Windows executables!

my linux suse 13.6.2 is missing a directory

I downloaded Suse Linux 32bit 3.16.6.2.0 as an iso, burned a DVD and installed it as a dual OS with my Win 7. Now, to get the WLan Stick to work....
Using the Win OS I downloaded two files :
ndiswrapper-1.59.tar.gz and fwlanusb-1.00.00.tar.gz
I moved them into the Linux partition and ran the ./install files as instructed.
With both of these installation it requires running a makefile script. In both cases it comes to a crashing stop when /lib/modules/kernel3.16.6.2.0/build is not found.
The 'build' subdirectiory or file is not present. Can I call up one of the rpms to get this part of the Linux OS installed?? Which rpm??
Solving the problem with my WLAN Stick is especially hard because often the Linux documentation says : "in order to make you your internet connection function you must download xyz".
Please install the kernel-source RPM for your running kernel. If this doesn't help already, please make sure that a symlink from /lib/modules/kernel3.16.6.2.0/build to /usr/src/linux exists.

make-kpkg not working in Fedora 20

I have been working with Linux kernel, compiling and inserting modules, in my custom kernels. Previously I had Ubuntu where I had been working with my custom kernel and all the commands for compiling and installing kernel worked like a charm once I had installed all the required libraries.
Now I have switched over to Fedora 20, here I want to install my custom kernel and for that I downloaded all possible kernel tools, namely, Kernel Development Kernel Tools these are group installs and other libraries that I downloaded were ia32 libraries (as I am working on 64-bit OS), kernel-devel package. Still I am not able to work with make-kpkg command. It says bash: make-kpkg: command not found....
I googled out and did everything I could.
Can anyone get me out of this trouble?
make-kpkg is a Debian kernel packaging tool. It does not exist on RHEL family distributions, such as Fedora.
Please refer to the Fedora documentation page "Building a custom kernel" for the correct procedure. (I have not reproduced it here as it is rather long, and I'm not sure how far you may have gotten.)
The make-kpkg tool is part of the 'kernel-package' package on Debian systems. It is a Debian tool to produce debian package files. Ubuntu is based on Debian and has this tool. However, Fedora uses a different system to manage packages. So, make-kpkg would not be available on Fedora.

linux, freepascal, fp-ide: No debugger support availble. How to enable debugger?

How to enable debugger in fp-ide? I read somewhere that I should compile fp-ide from sources, but I don't know how to do this. Can someone help me?
Get the generic linux tar installer (fpc-2.6.0.x86_64-linux.tar) for FPC from http://www.freepascal.org/down/x86_64/linux-hungary.var It comes with a precompiled IDE with integrated debugger support and it works fine at least on 12.04 LTS.
I wasn't able to find a PPA for fp-ide, but I can describe how the CLI IDE is compiled on Arch Linux as documented in the repository. Do note that compiling will not enable the debugger in the CLI, as it seems to be an incompatibility between gdb and fp (fp-ide) according to e.g. this bug report in Debian. On Arch Linux, the fpc package also doesn't support the debugger in fp by design (it is explicitly disabled using the NOGDB flag).
Anyhow, here goes the compilation process:
Make sure you have FreePascal installed already, as you need it to compile the IDE
Download the source tarball
Extract the tarball to a location of your convenience and cd into that directory
Execute the following code from within your shell:
pushd fpcsrc/compiler
fpcmake -Tall
popd
make build
make -j1 install
# in Arch, the switch "NOGDB=1" is present in both make lines
That should compile the IDE and install it (you can even try to integrate it in dpkg by using checkinstall instead of make install, but take a look at the Arch PKGBUILD to see an example of what might be needed).
But why do you use the command line IDE fp instead of lazarus? With lazarus you can also make console applications and it offers much more features (e.g. working debug support).

Resources