Computer Software > Linux
Old, bad apt-get packages
Weaver:
I have a (hosted) Raspberry Pi, out on the internet, which runs Ubuntu 16.04/ARM32.
I have two D compilers installed using apt-get. The GDC compiler does not work properly because as far as I can see the compiler is ancieng and does not support the syntax used in some of the D include files as it comes up with errors on particular lines of D source in an include file when it tries to compile them. The error messages that is shows regarding that source code are not reasonable, there is nothing wrong with the source, it just seems to me that the spec of the language must have been less capable in the past, it is just saying "you cannot do x" but indeed you can and I and others do so all the time.
The LDC2 compiler has also been installed and works fine.
My question: how does one fix an old, outdated or broken apt-get package - whatever it is called?
--
error is :
root@raspberrypi:~# gdc mac_hex.d -O3 -frelease
/usr/include/d/core/stdc/config.d:58:3: error: static if conditional cannot be at global scope
static if( (void*).sizeof > int.sizeof )
^
This file has
==
version(Windows)
...
else version( Posix )
{
static if( (void*).sizeof > int.sizeof )
{
etc etc
==
It shows version
gdc --version
gdc (Ubuntu/Linaro 5.3.1-14ubuntu2) 5.3.1 20160413
Copyright (C) 2015 Free Software Foundation, Inc.
So that is unfortunately really old and I would love to get a new package
Weaver:
For those that do not speak D, "version", is a compile-time 'if', exactly like #ifdef, for different builds or different conditions/ options. So too is "static if", it is just the same as a #if, it runs at compile time only and can access all D variables, as in D there is no separation into two languages that you get in C with #define variables in the preprocessor language only and on the other side there are C native variables that the preprocessor itself does not grok at all.
So there is nothing at all wrong with that static if, that is exactly what it is for. But in any case, someone shipped a screwed up set of files, with a compiler plus D header files that do not match, or else if I am wrong header files that do not compile anyway.
roseway:
I'm slightly surprised that you have gdc version 5.3.1, which is indeed rather old. Debian Stable and Raspbian have gdc version 6.3.0. What do you see if you open a terminal and type
--- Code: ---apt-cache policy gdc
--- End code ---
?
This is what I see on my Debian Stable system:
--- Code: ---eric@great-tit:~$ apt-cache policy gdc
gdc:
Installed: (none)
Candidate: 4:6.3.0-4
Version table:
4:6.3.0-4 500
500 http://ftp.uk.debian.org/debian stretch/main amd64 Packages
eric@great-tit:~$
--- End code ---
If indeed the latest is only 5.3.1, then perhaps you have a rather old version of Ubuntu installed?
Weaver:
I get the following
--
--- Code: ---root@raspberrypi:~# apt-cache policy gdc
gdc:
Installed: 4:5.3.1-1ubuntu1
Candidate: 4:5.3.1-1ubuntu1
Version table:
*** 4:5.3.1-1ubuntu1 500
500 http://ports.ubuntu.com xenial/universe armhf Packages
100 /var/lib/dpkg/status
--- End code ---
Weaver:
--- Code: ---root@raspberrypi:~# uname -r
4.9.24-v7+
root@raspberrypi:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial
root@raspberrypi:~#
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version