Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Old, bad apt-get packages  (Read 406 times)

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6565
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Old, bad apt-get packages
« on: July 19, 2018, 12:48:17 AM »

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
« Last Edit: July 19, 2018, 12:50:47 AM by Weaver »
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6565
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: Old, bad apt-get packages
« Reply #1 on: July 19, 2018, 12:58:25 AM »

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.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39360
  • Penguins CAN fly
    • DSLstats
Re: Old, bad apt-get packages
« Reply #2 on: July 19, 2018, 07:27:27 AM »

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: [Select]
apt-cache policy gdc?

This is what I see on my Debian Stable system:

Code: [Select]
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:~$

If indeed the latest is only 5.3.1, then perhaps you have a rather old version of Ubuntu installed?
Logged
  Eric

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6565
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: Old, bad apt-get packages
« Reply #3 on: July 19, 2018, 08:06:59 AM »

I get the following
--
Code: [Select]
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                                                                                                                                                                   
                     
« Last Edit: July 19, 2018, 08:11:49 AM by Weaver »
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6565
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: Old, bad apt-get packages
« Reply #4 on: July 19, 2018, 08:10:38 AM »

Code: [Select]
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:~#
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 6565
  • Retd sw dev; A&A; 4 7km ADSL2; IPv6; Firebrick
Re: Old, bad apt-get packages
« Reply #5 on: July 19, 2018, 08:16:06 AM »

This is a Raspberry Pi hosted on the net by Mythic Beasts. They offer three different versions of *nix for the Pi and I have tried a couple of them at random, in total ignorance.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39360
  • Penguins CAN fly
    • DSLstats
Re: Old, bad apt-get packages
« Reply #6 on: July 19, 2018, 10:27:59 AM »

Ubuntu version 16.04 LTS is equivalent to Debian Jessie ('oldstable'), and gdc version 5.3.1 is the version included with that. There may be a way to install a more recent version, but you need someone more familiar with Ubuntu than me to advise on that.
Logged
  Eric
 

anything