Re: Installing on Debian Stretch?

Waldek Hebisch <[email protected]> Wed, 12 Jun 2019 16:04:34 +0200 (CEST)
Newsgroups gmane.comp.compilers.gpc
Message-ID <[email protected]>
Ken Linder wrote:
> 
> Hello all,
> 
> Thought I would try installing the most recent version of GPC on my Debian
                                     ^^^^^^^^^^^
> Stretch machine.  I downloaded gpc-2.1-with-gcc.i686-pc-linux-gnu.tar.gz
                                 ^^^^^^^

gpc-2.1 is quite old and a lot developements happened after it was
released

> and expanded it as specified here:
> https://www.gnu-pascal.de/gpc/Binary-Distributions.html#Binary-Distributions
> 
> It doesn't matter what options I use when trying to run the GPC compiler.
> I always get the following error:
> 
> -bash: /usr/local/bin/gpc: No such file or directory
> 
> I think something is missing somewhere, just not certain what.
> 
> So the simple question before digging in: Has anyone successfully installed
> the 2.1 compiler on Debian Stretch?  If so, was there something additional
> that needs to be done?

You skipped most important piece of information: is your system 32-bit?
You fetched old 32-bit version of GPC.  Vast majority of PC-s now
are capable of running 64-bit system and there are definite advantages
to doing so.   So there is good chance that you have 64-bit system.
In the past 64-bit systems had pretty good support for running
32-bit binaries.  But new distributions by default are only
capable of running 64-bit binaries.  For example, Debian 7 on
machine that I write this is neiter able to create 32-bit binary
nor to run one if I fetch 32-bit binary from other machine.
When trying to run binary error message is exactly the one you
gave: before normal ELF binary runs kernel has to run
appropriate version of 'ld-linux.so'.  If 32-bit support is
not installed needed version of 'ld-linux.so' is missing.

If you want to stick to old version you need to install support
for 32-bit binaries, that is several packages which used to be
installed by default, but now are in some obscure part of repository.
Sorry, that I do not give you more details, but I do not remember
more details.  I gave you enough keywords so that you can search
net yourself.

Alternatively, you can try newer gpc versions which for which
there are 64-bit binaries.

If you want most recent GPC, this is only provided as source:

https://github.com/hebisch/gpc

There may be troubles building on recent Linux.  Namely,
to build GPC you need to simultaneously build GCC.  And
GCC needs several files that should be installed on your
machine.  Recently Linux distributions changed locations
of those files so that old gcc can not find them and
build fails.  I have a patch to older gcc so that it
(and hence also GPC) can build on resonably new distribution
that I run.  I do not remember if the patch is included
in Github repo.  Also, the patch was tested only on
one system and other distribution can break GPC in
different way.

-- 
                              Waldek Hebisch

_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc