How to install GCC 6.3 on trisquel 7

41 respuestas [Último envío]
tomlukeywood
Desconectado/a
se unió: 12/05/2014

I am compiling a program that requires at least GCC 5 but GCC 5 is not in trisquel's repositorys what is the best way to install GCC 5 or above on trisquel 7?

doolio
Desconectado/a
se unió: 12/31/2013

Perhaps consider installing the Guix package manager. With it you can currently install any (or all) of gcc 4.7.4, 4.8.5, 4.9.4, 5.4.0, 6.3.0 (see link below) so it would be possible to use the gcc specifically required by your program. The Guix packages are based on a rolling release model so they should always have the latest version available for the packages they currently provide. Their list of packages is still small compared to those available in the Trisquel repositories but it is growing all the time. The other advantage is you can be confident they only provide free software packages and is a much better option that some random ppa. I've recently done a fresh install of Trisquel 7 and have been using Guix almost exclusively as my package manager. For anything it doesn't have I can always fall back to the Trisquel repositories.

https://www.gnu.org/software/guix/packages/g.html

MD. SHAHIDUL ISLAM
Desconectado/a
se unió: 10/14/2015

how can install guix package manager in trisquel

doolio
Desconectado/a
se unió: 12/31/2013

Here you go. If anything is not clear feel free to ask.

https://www.gnu.org/software/guix/manual/guix.html#Binary-Installation

Note for any code blocks the manual tends to use the standard $ for a normal user and # for a root user.

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010
tomlukeywood
Desconectado/a
se unió: 12/05/2014

I have installed GCC5 using this PPA but i get the same error message:
requires at least GCC 5.0 (found 4.8.5)

aloniv

I am a translator!

Desconectado/a
se unió: 01/11/2011

tomlukeywood, I think you need to tell your operating system to use the new GCC you installed. You can see here how to get GCC 4.9 working (just adjust the command after the installation of GCC 4.9 to the GCC of your choosing):

https://trisquel.info/en/wiki/how-install-twinkle-version-19-trisquel-7

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

Indeed. Something like that:
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5

aloniv

I am a translator!

Desconectado/a
se unió: 01/11/2011

It's probably best to also get G++ in which case this command should do it if you want version 5 of GCC:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 100 --slave /usr/bin/g++ g++ /usr/bin/g++-5

tomlukeywood
Desconectado/a
se unió: 12/05/2014

Thanks! it works now

Geshmy
Desconectado/a
se unió: 04/23/2015

Have question re https://www.gnu.org/software/guix/manual/guix.html#Binary-Installation

Step 2 As root, run:

# cd /tmp
# tar --warning=no-timestamp -xf \
guix-binary-0.12.0.system.tar.xz
# mv var/guix /var/ && mv gnu /

and I get
tar: guix-binary-0.12.0.system.tar.xz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Did the manual just forget to tell one to move the tarball to the /tmp directory?

I am trying this in Flidas.

doolio
Desconectado/a
se unió: 12/31/2013

Yes, it omitted that point.

Geshmy
Desconectado/a
se unió: 04/23/2015

Thanks for the confirmation. Really appreciate the help :)

So I did move it to /tmp and was able to proceed.

Now at step 5
I chose the 'If your host distro uses the systemd init system' option

I get:
systemctl start guix-daemon && systemctl enable guix-daemon
Failed to execute operation: Too many levels of symbolic links

I have created these links
ln -s ~root/.guix-profile/lib/systemd/system/guix-daemon.service /etc/systemd/system/

ln -sf /var/guix/profiles/per-user/root/guix-profile ~root/.guix-profile

Any ideas?

Also, am I going to want to do a usermod -a -G guixbuild geshmy

Edit, I tried breaking up the commands to start and enable and systemctl start worked without error but systemctl enable kicks out the 'Too many levels of symbolic links' error.

doolio
Desconectado/a
se unió: 12/31/2013

Yes, for that step I had to use the Upstart commands instead. It seems on Trisquel 7 at least the init system is Upstart and not systemd. But if you attempting this on Flidas then I believe that systemd is the init that is used.


# ln -s ~root/.guix-profile/lib/upstart/system/guix-daemon.conf /etc/init/
# start guix-daemon

As for adding your user to the guix group that should have been handled by step 4 which linked to this page:

https://www.gnu.org/software/guix/manual/guix.html#Build-Environment-Setup

ADFENO
Desconectado/a
se unió: 12/31/2012

Regarding build users: As far as the documentation goes: The average
users need not to be members of the "guixbuild" group.

doolio
Desconectado/a
se unió: 12/31/2013

As I've explained I didn't encounter this error. If you run 'top' and search (CTL-L) for 'guix' do you see the guix-daemon running? If so then you've been successful in starting the daemon. Then I suggest you restart your machine and see if the daemon is running after booting up again by searching under top.

ADFENO
Desconectado/a
se unió: 12/31/2012

In which order did you attempt to make the series of `ln` commands?

It seems you made it in inverse order.

Also, if I'm not mistaken, Trisquel 7 doesn't use systemd entirely. It
does have Upstart instead (this is what I chose in the step that you
are right now).

doolio
Desconectado/a
se unió: 12/31/2013

This may also help resolve your issue.

https://github.com/systemd/systemd/issues/3010

Geshmy
Desconectado/a
se unió: 04/23/2015

Thanks again doolio. But eeks, what have I done!

I saw running systemctl list-units:
guix-daemon.service loaded active running Build daemon for GNU Guix

so the daemon is running, I can just start it manually whenever I want it.

I did do the Build-Environment-Setup.

I tried a command
guix package -i glibc-locales
bash: guix: command not found

as sudo also same result.

I found the steps to make the command available and tried
guix package -i hello as root and now it's going nuts, looks like it's downloading the universe!

doolio
Desconectado/a
se unió: 12/31/2013

haha, yes it does look that way. You should only need to install the glibc locales as your normal user. I did initially as root but then had to repeat it for my normal user account. In fact, I believe each unique user on the machine needs to install the glibc locales. So once the hello package under root installs check that it was successful by checking the list of installed packages with:

guix package -I

Then you can close that root terminal and use guix with your normal user account.

ADFENO
Desconectado/a
se unió: 12/31/2012

First and foremost, you must decide if you will authorize your copy of
Guix to trust the default build/substitutes/derivations service provider
(that is, the Guix project itself), the installation guide you followed
explains how to trust the default substitutes service provider (at step
7), it's important that you follow that section if you don't want your
own computer to try to build the universe.

Also, there are other package recipe and substitutes service providers
around the world of course, but these you have to find and add by
yourself. As you have seen, Guix is package manager which allows the
user to add custom packages, custom repositories, and custom
substitutes.

And, of course, after doing step 7, do the following as root:

# guix pull

Then you can proceed to do as the guide tells, for example:

This finishes the root-user-level installation.

However, as you said: `guix package -i hello` doesn't do what you
expect, this means *both* of the two things:

1. You're trying to run guix as normal user.

2. The `guix` command wasn't made available by the root user to the
other users, so you must have skipped step 6.

Geshmy
Desconectado/a
se unió: 04/23/2015

Awesome.

It's still going.

I may have posted the link commands backwards as I was scrolling up the history in the shell and probably posted them in the reverse order.

What does the daemon do? Look for updates?
I guess I might try to reverse the process done choosing systemd or maybe I can set up a cron like script to get it going.

'So once the hello package under root installs check that it was successful by checking the list of installed packages with:

guix package 'I

Then you close that root terminal and use guix with your normal user account.'

I look forward to doing those steps.

doolio
Desconectado/a
se unió: 12/31/2013

No, the daemon is a service that allows you to interact with the guix package store (/gnu/store). It is responsible for building packages on behalf of users and for downloading pre-built binaries from authorized sources. I don't believe guix notifies you of updates plus I don't see a need for it to do so. It follows a rolling release model where the available packages are built daily I believe. To get the latest updates of the packages you install you have to execute:

guix pull

Note, this will initially install guix itself! So, you use guix to update guix. How often you run guix pull is a question I posed to the mailing list and the response was that it is based on your feelings wrt security and stability.

ADFENO
Desconectado/a
se unió: 12/31/2012

As a personal rule of thumb I run `guix pull` *before any* `guix package`
command that involves `-u`/`--upgrade` or `-i`/`--install` options. I do
this both for root and for normal users, but this is just my personal choice.

stas730 (no verificado)
stas730

Can I use both Guix and dpkg?

doolio
Desconectado/a
se unió: 12/31/2013

Yes, as they work off different repositories and databases.

Magic Banana

I am a member!

I am a translator!

Desconectado/a
se unió: 07/24/2010

You mean APT. 'dpkg' does not know what is a repository (packages must be passed as arguments).

doolio
Desconectado/a
se unió: 12/31/2013

Thank you for correcting me. I am not very familiar with dpkg and did not appreciate this point.

Geshmy
Desconectado/a
se unió: 04/23/2015

I have managed to get extremetuxracer and avidemux working via guix package. Cool!

I thought it might be good to post a 'how to' for guix on flidas. Would like to help out and unfortunately I am not a good programmer but could maybe add to documentation.

I do have some remaining issues however.

1. extremetuxracer and avidemux or any other fsf install comes without any icon or entry to my start menu. The programs also were not found as commands from the terminal.

I finally found I could get them running from the terminal like this:
/gnu/store/ajxz0h6i3h3809di9qf8n7hjzp8g3gkg-avidemux-2.6.12/bin/avidemux3_qt5

of course, this part, /gnu/store/ajxz0h6i3h3809di9qf8n7hjzp8g3gkg, is different for every program so it takes a little work to locate and create the actual path for the command.

This doesn't seem very user friendly. Am I missing something? It's not a deal breaker, will be fun to try to make my own icons and launchers, etc.

2. Maybe this is related, I don't know but I have tried multiple fixes for this warning and still I get this error:

$ guix pull
warning: failed to install locale: Invalid argument

ADFENO's point re authorizing substitutes was taken too late and first attempts to install emacs took hours and guix was filling up my partition. But I was able to add that step and after running the garbage collection command the situation seems better: /usr is 4.2 GB, /gnu is 3.1 GB and /var 1.1 GB on a 25.5 GB partition.

doolio
Desconectado/a
se unió: 12/31/2013

Add the following to your .(bash)rc file. This will add the guix pacakages to your path and make them available via the command line. So you should just be able to type avidemux3_qt5 for example or 'avi then TAB' would probably be enough to find it too.


export PATH="$HOME/.guix-profile/bin:$HOME/.guix-profile/sbin:${PATH}"
export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale

You are getting the error


warning: failed to install locale: Invalid argument

most likely because you installed the locale for the root user and not your normal user and/or you did not define the GUIX_LOCPATH environment variable.

doolio
Desconectado/a
se unió: 12/31/2013

And if you want to add a menu item do so as in the attached screenshot. You can then add this to your desktop panel as well.

Adding a new menu option.png
Geshmy
Desconectado/a
se unió: 04/23/2015

Good tip, avidemux is listed in the sound and video section. Cool.

doolio
Desconectado/a
se unió: 12/31/2013

The method described by ADFENO is the correct method to achieve this. Thanks ADFENO.

ADFENO
Desconectado/a
se unió: 12/31/2012

* Why somethings are missing?

Guix is managed *per-user* , so one must do most things per-user
depending on what must be done. Of course, somethings aren't needed,
e.g.: Installing graphical programs or icon themes for root user
(because root user doesn't really use these that much).

* Regarding missing icons

Install "adwaita-icon-theme" and "hicolor-icon-theme" from Guix, then
make a symbolic link to the resulting "Adwaita" and "hicolor"
directories (that are inside the user's Guix profile), like so:

(Note: remember to use `ln` with the `-s`/`--symbolic` option, and keep
paths relative so that things are easier to move around to other
computers or users, that is, remember to use the the triple "../" shown
here).

$ cd ".local/share/icons"
$ ln -s "../../../.guix-profile/share/icons/Adwaita"
$ ln -s "../../../.guix-profile/share/icons/hicolor"

* Missing application launchers in the menu

After installing an application, their .desktop files (application
launchers) are available in "$GUIX_PROFILE/share/applications".

For example, suppose I just installed GnuCash and Icecat for my current
user, then I do:

$ cd ".local/share/applications"
$ ln -s "../../../.guix-profile/share/applications/gnucash.desktop"
$ ln -s "../../../.guix-profile/share/applications/icecat.desktop"

Some applications still don't have the .desktop file, or it's not doing
all that it's supposed to do (e.g.: *Suppose* VLC doesn't appear in the
"Open with" right-mouse menu when clicking on some files, then this
might be an issue with the vlc.desktop file, or with your user's "mime"*
files in the same directory (".local/share/applications") or in
"/usr/share/applications", or in some other place people knowledgeable
of customization might have to englighten us. ;)

ADFENO
Desconectado/a
se unió: 12/31/2012

I forgot to continue writting:

In this later case of misbehaving .desktop file, it's often needed to
*copy* the .desktop file that is made available in the Guix profile of
the current user, and modify it for your needes. When done, perhaps you
can send a git/unified patch to Guix project so that they apply your
modifications (and you also get the chance to put your copyright holder
line in the relevant files, so you can participate in some decision
making and license compliance enforcement in the future, if you so desire).

Geshmy
Desconectado/a
se unió: 04/23/2015

ADFENO, thank you for those instructions, here is a summary of what I did.
My install of Flidas did not have a .local/share/icons directory so I added the step to make it.

**Installing brasero via guix package with goal of getting it into the main menu.**

cd ~/.local/share
mkdir icons

guix package -i adwaita-icon-theme
guix package -i hicolor-icon-theme

cd icons
ln -s "../../../.guix-profile/share/icons/Adwaita"
ln -s "../../../.guix-profile/share/icons/hicolor"

guix package -i brasero

cd ~/.local/share/applications
ln -s "../../../.guix-profile/share/applications/brasero.desktop"

After these steps I saw an entry for Brasero in the 'Sound and Video' section of Main Menu but the icon was generic. It sort of looks like a square piece of black film with the lower right corner curled up. I used doolio's tip: Control Center > Main Menu > Sound and Video > Brasero > (left click) Properties > and click on the icon upper left corner > and navigated to ~/.local/share/icons/hicolor/48x48/apps/brasero.png > Open and the icon showed up in the Control Center > Main Menu dialog. It did not show up in the actual Main Menu but after I rebooted, it was there. And clicking on it brings up Brasero so all is good for Brasero.

It seems like Control Center > Appearance should list the Adwaita Theme but it does not. It seems like selection of an appropriate icon should be automatic (and now after a reboot maybe it will be, I'll look for another package from the guix packages to install).

Thanks again for you guidance, it has been a big help.

ADFENO
Desconectado/a
se unió: 12/31/2012

I'm not sure how GNOME works, but perhaps we must restart your current
user seesion for the icons to take effect. Simply go to the applications
menu (the one with Trisquel logo), and go to "close/end session" this
will close all your current applications, so make sure to save things or
to have your documents edited through applications like GNU Screen and
GNU Emacs.

Geshmy
Desconectado/a
se unió: 04/23/2015

Thanks, that worked. I thought I had done that as regular user but I guess not.

Oops, may be only part way:
The following derivation will be built:
/gnu/store/kw329g7w9jpr2gbqi20vvh6qwa6c8x4z-guix-latest.drv
warning: failed to install locale: Invalid argument

doolio
Desconectado/a
se unió: 12/31/2013

Can you post the output of (as your normal user)

guix package -I

Geshmy
Desconectado/a
se unió: 04/23/2015

guix package -I
warning: failed to install locale: Invalid argument
gs-fonts 8.11 out /gnu/store/mh3mx042h5ayvg9mgmfln4kwvs102lzp-gs-fonts-8.11
font-dejavu 2.37 out /gnu/store/8rid533v40vawypqqckxx6v30sc89yby-font-dejavu-2.37
font-gnu-freefont-ttf 20120503 out /gnu/store/dl11724dj1z6dsw7i82jmavk75ixp0b8-font-gnu-freefont-ttf-20120503
glibc-utf8-locales 2.24 out /gnu/store/bhj5xdwwd2dg770lmlks7hyny8vzjm9x-glibc-utf8-locales-2.24
glibc-locales 2.24 out /gnu/store/hyi7svs0ds79wrcg5l0nr36zzjikqj7i-glibc-locales-2.24
emacs 25.1 out /gnu/store/6l2fiqgj4g1018xkqn3mfyrj9r2zh9k6-emacs-25.1
alsa-modular-synth 2.1.2 out /gnu/store/0f4drni8gikx09sq1bfp4ymbvnarfa42-alsa-modular-synth-2.1.2
avidemux 2.6.12 out /gnu/store/ajxz0h6i3h3809di9qf8n7hjzp8g3gkg-avidemux-2.6.12
extremetuxracer 0.7.4 out /gnu/store/i1rp7jy9frxivnqwmi3a8dz57jsmbqp7-extremetuxracer-0.7.4
ffmpeg 3.2.4 out /gnu/store/m8vd71axx8n6jbq8pdm8iqrn9qkvnb74-ffmpeg-3.2.4
folks 0.11.2 out /gnu/store/h7kpmcklpf1hpz4fiqln3m1sn0ni2jrs-folks-0.11.2
mysql 5.7.17 out /gnu/store/ylybbdz5xi8xvcvs4qanyjp047sg424a-mysql-5.7.17
tor 0.2.9.9 out /gnu/store/0p09qsfpyhscxp250wcsld9nbwkgdpzn-tor-0.2.9.9
sound-theme-freedesktop 0.8 out /gnu/store/xyyvrbkzb5331c7ggzqzsv90hrn40f7d-sound-theme-freedesktop-0.8

doolio
Desconectado/a
se unió: 12/31/2013

So it seems you have installed the glibc-locales. You also have the smaller glibc-utf8-locales package as well so perhaps there is a conflict between the two. This seems unlikely though. Can you also double check you have set the GUIX-LOCPATH environment correctly? Otherwise, I'm at a loss so you may want to seek help on the help-guix mailing list.

Geshmy
Desconectado/a
se unió: 04/23/2015

I have these entries in .bashrc

LANG="en_US.utf8"
export LANG

export INFOPATH="/home/gsmyli_tr8/.guix-profile/share/info${INFOPATH:+:}$INFOPATH"
export PATH="$HOME/.guix-profile/bin:$HOME/.guix-profile/sbin:${PATH}"

export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

I also ran:
localectl list-locales
sudo locale-gen en_US
sudo locale-gen en_US.UTF-8
sudo update-locale

So far, still "Invalid argument"

Thanks, I'll seek help at
https://www.gnu.org/software/guix/help/

Since guix did get me hexchat maybe I'll try using #guix channel on irc.freenode.net.