<p>Did you fix this
&quot; Warn: Possibly insufficient disk space on /tmp. <strong>At least 5000 MB are recommended, but only 698.57 are free</strong>. Consider freeing up disk space or setting TMPD&gt;
Warn: ...waiting for 10 seconds before continuing anyway, you can still abort... &quot;</p>
<p>When you have insufficient diskspace then the compiler may abort with the reason &quot;impossible happened&quot;</p>

CC BY-SA 4.0
2021-11-12T15:14:12.197Z
yes , that is what i try to solve, but i dont find the root cause to fix this,,,
please check the output of my disk....

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             15G     0   15G   0% /dev
tmpfs           3.0G  648K  3.0G   1% /run
/dev/sda2       786G   45G  702G   6% /
tmpfs            15G     0   15G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            15G     0   15G   0% /sys/fs/cgroup
/dev/loop0      976M  2.6M  907M   1% /tmp
tmpfs            15G     0   15G   0% /run/shm
/dev/sda1       922M  141M  718M  17% /boot
TTS17
CC BY-SA 4.0
2021-11-11T21:11:26.943Z
2021-11-11T21:11:26.943Z
PGWAD Pool
<p>thank you for your time, i just found and remembered i had implemented this solution for security reasons.
<a href="http://bookofzeus.com/harden-ubuntu/server-setup/secure-tmp-var-tmp/" rel="nofollow noreferrer">http://bookofzeus.com/harden-ubuntu/server-setup/secure-tmp-var-tmp/</a></p>
<h1>Let's create a 1GB (or what is best for you) filesystem file for the /tmp parition.</h1>
<p>sudo fallocate -l 1G /tmpdisk
sudo mkfs.ext4 /tmpdisk
sudo chmod 0600 /tmpdisk</p>
<h1>Mount the new /tmp partition and set the right permissions.</h1>
<p>sudo mount -o loop,noexec,nosuid,rw /tmpdisk /tmp
sudo chmod 1777 /tmp</p>
<h1>Set the /tmp in the fstab.</h1>
<p>sudo nano /etc/fstab
: /tmpdisk  /tmp    ext4    loop,nosuid,noexec,rw   0 0
sudo mount -o remount /tmp</p>
<h1>Secure /var/tmp.</h1>
<p>sudo mv /var/tmp /var/tmpold
sudo ln -s /tmp /var/tmp
sudo cp -prf /var/tmpold/* /tmp/
sudo rm -rf /var/tmpold/</p>

CC BY-SA 4.0
2021-11-12T15:39:36.033Z
2021-11-12T15:39:36.033Z
TTS17
<p>with cabal build all,
i receive the message below</p>
<pre><code>[13 of 14] Compiling Generics.SOP.Instances ( src/Generics/SOP/Instances.hs, dist/build/Generics/SOP/Instances.o, dist/build/Generics/SOP/Instances.dyn_o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.10.2:
        Loading temp shared object failed: /tmp/ghc34004_0/libghc_89.so: failed to map segment from shared object

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

cabal: Failed to build generics-sop-0.5.1.1 (which is required by
exe:plutus-example from plutus-example-1.31.0 and test:cardano-testnet-tests
from cardano-testnet-1.31.0). See the build log above for details.
------
additionally i try to upgrade GHC and i have the errors below :
Configuring library for generics-sop-0.5.1.1..
Preprocessing library for generics-sop-0.5.1.1..
Building library for generics-sop-0.5.1.1..
[ 1 of 14] Compiling Generics.SOP.BasicFunctors ( src/Generics/SOP/BasicFunctors.hs, dist/build/Generics/SOP/BasicFunctors.o, dist/build/Generics/SOP/Basi&gt;
[ 2 of 14] Compiling Generics.SOP.Classes ( src/Generics/SOP/Classes.hs, dist/build/Generics/SOP/Classes.o, dist/build/Generics/SOP/Classes.dyn_o )
[ 3 of 14] Compiling Generics.SOP.Constraint ( src/Generics/SOP/Constraint.hs, dist/build/Generics/SOP/Constraint.o, dist/build/Generics/SOP/Constraint.dy&gt;
[ 4 of 14] Compiling Generics.SOP.Dict ( src/Generics/SOP/Dict.hs, dist/build/Generics/SOP/Dict.o, dist/build/Generics/SOP/Dict.dyn_o )
[ 5 of 14] Compiling Generics.SOP.NP  ( src/Generics/SOP/NP.hs, dist/build/Generics/SOP/NP.o, dist/build/Generics/SOP/NP.dyn_o )
[ 6 of 14] Compiling Generics.SOP.Metadata ( src/Generics/SOP/Metadata.hs, dist/build/Generics/SOP/Metadata.o, dist/build/Generics/SOP/Metadata.dyn_o )
[ 7 of 14] Compiling Generics.SOP.NS  ( src/Generics/SOP/NS.hs, dist/build/Generics/SOP/NS.o, dist/build/Generics/SOP/NS.dyn_o )
[ 8 of 14] Compiling Generics.SOP.Sing ( src/Generics/SOP/Sing.hs, dist/build/Generics/SOP/Sing.o, dist/build/Generics/SOP/Sing.dyn_o )
[ 9 of 14] Compiling Generics.SOP.Type.Metadata ( src/Generics/SOP/Type/Metadata.hs, dist/build/Generics/SOP/Type/Metadata.o, dist/build/Generics/SOP/Type&gt;
[10 of 14] Compiling Generics.SOP.GGP ( src/Generics/SOP/GGP.hs, dist/build/Generics/SOP/GGP.o, dist/build/Generics/SOP/GGP.dyn_o )
[11 of 14] Compiling Generics.SOP.Universe ( src/Generics/SOP/Universe.hs, dist/build/Generics/SOP/Universe.o, dist/build/Generics/SOP/Universe.dyn_o )
[12 of 14] Compiling Generics.SOP.TH  ( src/Generics/SOP/TH.hs, dist/build/Generics/SOP/TH.o, dist/build/Generics/SOP/TH.dyn_o )
[13 of 14] Compiling Generics.SOP.Instances ( src/Generics/SOP/Instances.hs, dist/build/Generics/SOP/Instances.o, dist/build/Generics/SOP/Instances.dyn_o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.10.2:
        Loading temp shared object failed: /tmp/ghc34004_0/libghc_89.so: failed to map segment from shared object

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug
</code></pre>
<hr />
<p><code>nano /home/rel/.ghcup/logs/ghcup.log</code></p>
<pre><code>Debug: Identified Platform as: Linux Ubuntu, 20.04
Info: downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.6.yaml as file /home/rel/.ghcup/cache/ghcup-0.0.6.yaml
Debug: Read etag: &quot;71004c1fe71d71cd7c6c10cf21ce10e2ff835b28e7f35047c214002c9f4a0cba&quot;
Debug: Status code was 304, not overwriting
Debug: Parsed etag: &quot;71004c1fe71d71cd7c6c10cf21ce10e2ff835b28e7f35047c214002c9f4a0cba&quot;
Debug: Writing etagsFile /home/rel/.ghcup/cache/ghcup-0.0.6.yaml.etags
Debug: Decoding yaml at: /home/rel/.ghcup/cache/ghcup-0.0.6.yaml
Warn: New GHC version available: 9.2.1. To upgrade, run 'ghcup install ghc 9.2.1'
Warn: New Cabal version available: 3.6.2.0. To upgrade, run 'ghcup install cabal 3.6.2.0'
Debug: Requested to install GHC with 8.10.4
Warn: Possibly insufficient disk space on /tmp. At least 5000 MB are recommended, but only 906.16 are free. Consider freeing up disk space or setting TMPD&gt;
Warn: ...waiting for 10 seconds before continuing anyway, you can still abort...
Info: downloading: https://downloads.haskell.org/~ghc/8.10.4/ghc-8.10.4-x86_64-fedora27-linux.tar.xz as file /tmp/ghcup-f4eda7a958f8e287/ghc-8.10.4-x86_64&gt;
Info: verifying digest of: ghc-8.10.4-x86_64-fedora27-linux.tar.xz
Warn: Possibly insufficient disk space on /tmp. At least 5000 MB are recommended, but only 698.57 are free. Consider freeing up disk space or setting TMPD&gt;
Warn: ...waiting for 10 seconds before continuing anyway, you can still abort...
Info: Unpacking: ghc-8.10.4-x86_64-fedora27-linux.tar.xz to /tmp/ghcup-69f45884bccc4e58
Info: Installing GHC (this may take a while)
Error: Process &quot;sh&quot; with arguments [&quot;./configure&quot;,
                             &quot;--prefix=/home/rel/.ghcup/ghc/8.10.4&quot;] failed with exit code 1.
Error: Also check the logs in /home/rel/.ghcup/logs
</code></pre>

CC BY-SA 4.0
2021-11-11T17:30:47.057Z
Please post the command you are running.
raghu
<cabal><build>
Impossible to install ghc 8.10.4
# Impossible to install ghc 8.10.4

(Asked by: username_0 on 2021-11-11)

with cabal build all,
i receive the message below
[13 of 14] Compiling Generics.SOP.Instances ( src/Generics/SOP/Instances.hs, dist/build/Generics/SOP/Instances.o, dist/build/Generics/SOP/Instances.dyn_o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.10.2:
        Loading temp shared object failed: /tmp/ghc34004_0/libghc_89.so: failed to map segment from shared object

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

cabal: Failed to build generics-sop-0.5.1.1 (which is required by
exe:plutus-example from plutus-example-1.31.0 and test:cardano-testnet-tests
from cardano-testnet-1.31.0). See the build log above for details.
------
additionally i try to upgrade GHC and i have the errors below :
Configuring library for generics-sop-0.5.1.1..
Preprocessing library for generics-sop-0.5.1.1..
Building library for generics-sop-0.5.1.1..
[ 1 of 14] Compiling Generics.SOP.BasicFunctors ( src/Generics/SOP/BasicFunctors.hs, dist/build/Generics/SOP/BasicFunctors.o, dist/build/Generics/SOP/Basi>
[ 2 of 14] Compiling Generics.SOP.Classes ( src/Generics/SOP/Classes.hs, dist/build/Generics/SOP/Classes.o, dist/build/Generics/SOP/Classes.dyn_o )
[ 3 of 14] Compiling Generics.SOP.Constraint ( src/Generics/SOP/Constraint.hs, dist/build/Generics/SOP/Constraint.o, dist/build/Generics/SOP/Constraint.dy>
[ 4 of 14] Compiling Generics.SOP.Dict ( src/Generics/SOP/Dict.hs, dist/build/Generics/SOP/Dict.o, dist/build/Generics/SOP/Dict.dyn_o )
[ 5 of 14] Compiling Generics.SOP.NP  ( src/Generics/SOP/NP.hs, dist/build/Generics/SOP/NP.o, dist/build/Generics/SOP/NP.dyn_o )
[ 6 of 14] Compiling Generics.SOP.Metadata ( src/Generics/SOP/Metadata.hs, dist/build/Generics/SOP/Metadata.o, dist/build/Generics/SOP/Metadata.dyn_o )
[ 7 of 14] Compiling Generics.SOP.NS  ( src/Generics/SOP/NS.hs, dist/build/Generics/SOP/NS.o, dist/build/Generics/SOP/NS.dyn_o )
[ 8 of 14] Compiling Generics.SOP.Sing ( src/Generics/SOP/Sing.hs, dist/build/Generics/SOP/Sing.o, dist/build/Generics/SOP/Sing.dyn_o )
[ 9 of 14] Compiling Generics.SOP.Type.Metadata ( src/Generics/SOP/Type/Metadata.hs, dist/build/Generics/SOP/Type/Metadata.o, dist/build/Generics/SOP/Type>
[10 of 14] Compiling Generics.SOP.GGP ( src/Generics/SOP/GGP.hs, dist/build/Generics/SOP/GGP.o, dist/build/Generics/SOP/GGP.dyn_o )
[11 of 14] Compiling Generics.SOP.Universe ( src/Generics/SOP/Universe.hs, dist/build/Generics/SOP/Universe.o, dist/build/Generics/SOP/Universe.dyn_o )
[12 of 14] Compiling Generics.SOP.TH  ( src/Generics/SOP/TH.hs, dist/build/Generics/SOP/TH.o, dist/build/Generics/SOP/TH.dyn_o )
[13 of 14] Compiling Generics.SOP.Instances ( src/Generics/SOP/Instances.hs, dist/build/Generics/SOP/Instances.o, dist/build/Generics/SOP/Instances.dyn_o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.10.2:
        Loading temp shared object failed: /tmp/ghc34004_0/libghc_89.so: failed to map segment from shared object

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug


nano /home/rel/.ghcup/logs/ghcup.log
Debug: Identified Platform as: Linux Ubuntu, 20.04
Info: downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.6.yaml as file /home/rel/.ghcup/cache/ghcup-0.0.6.yaml
Debug: Read etag: "71004c1fe71d71cd7c6c10cf21ce10e2ff835b28e7f35047c214002c9f4a0cba"
Debug: Status code was 304, not overwriting
Debug: Parsed etag: "71004c1fe71d71cd7c6c10cf21ce10e2ff835b28e7f35047c214002c9f4a0cba"
Debug: Writing etagsFile /home/rel/.ghcup/cache/ghcup-0.0.6.yaml.etags
Debug: Decoding yaml at: /home/rel/.ghcup/cache/ghcup-0.0.6.yaml
Warn: New GHC version available: 9.2.1. To upgrade, run 'ghcup install ghc 9.2.1'
Warn: New Cabal version available: 3.6.2.0. To upgrade, run 'ghcup install cabal 3.6.2.0'
Debug: Requested to install GHC with 8.10.4
Warn: Possibly insufficient disk space on /tmp. At least 5000 MB are recommended, but only 906.16 are free. Consider freeing up disk space or setting TMPD>
Warn: ...waiting for 10 seconds before continuing anyway, you can still abort...
Info: downloading: https://downloads.haskell.org/~ghc/8.10.4/ghc-8.10.4-x86_64-fedora27-linux.tar.xz as file /tmp/ghcup-f4eda7a958f8e287/ghc-8.10.4-x86_64>
Info: verifying digest of: ghc-8.10.4-x86_64-fedora27-linux.tar.xz
Warn: Possibly insufficient disk space on /tmp. At least 5000 MB are recommended, but only 698.57 are free. Consider freeing up disk space or setting TMPD>
Warn: ...waiting for 10 seconds before continuing anyway, you can still abort...
Info: Unpacking: ghc-8.10.4-x86_64-fedora27-linux.tar.xz to /tmp/ghcup-69f45884bccc4e58
Info: Installing GHC (this may take a while)
Error: Process "sh" with arguments ["./configure",
                             "--prefix=/home/rel/.ghcup/ghc/8.10.4"] failed with exit code 1.
Error: Also check the logs in /home/rel/.ghcup/logs

**Tags:** cabal, build
> **Comments:**
> **username_1**: Please post the command you are running.  

---

## 2 answers

### Answer by username_2 on 2021-11-11. Score: 1

Did you fix this
" Warn: Possibly insufficient disk space on /tmp. **At least 5000 MB are recommended, but only 698.57 are free**. Consider freeing up disk space or setting TMPD>
Warn: ...waiting for 10 seconds before continuing anyway, you can still abort... "

When you have insufficient diskspace then the compiler may abort with the reason "impossible happened"

> **Comments:**
> **username_0**: yes , that is what i try to solve, but i dont find the root cause to fix this,,, please check the output of my disk....  $ df -h Filesystem      Size  Used Avail Use% Mounted on udev             15G     0   15G   0% /dev tmpfs           3.0G  648K  3.0G   1% /run /dev/sda2       786G   45G  702G   6% / tmpfs            15G     0   15G   0% /dev/shm tmpfs           5.0M     0  5.0M   0% /run/lock tmpfs            15G     0   15G   0% /sys/fs/cgroup /dev/loop0      976M  2.6M  907M   1% /tmp tmpfs            15G     0   15G   0% /run/shm /dev/sda1       922M  141M  718M  17% /boot  

---

### Answer by username_0 on 2021-11-12. Score: 0

thank you for your time, i just found and remembered i had implemented this solution for security reasons.
<http://bookofzeus.com/harden-ubuntu/server-setup/secure-tmp-var-tmp/>

# Let's create a 1GB (or what is best for you) filesystem file for the /tmp parition.

sudo fallocate -l 1G /tmpdisk
sudo mkfs.ext4 /tmpdisk
sudo chmod 0600 /tmpdisk

# Mount the new /tmp partition and set the right permissions.

sudo mount -o loop,noexec,nosuid,rw /tmpdisk /tmp
sudo chmod 1777 /tmp

# Set the /tmp in the fstab.

sudo nano /etc/fstab
: /tmpdisk /tmp ext4 loop,nosuid,noexec,rw 0 0
sudo mount -o remount /tmp

# Secure /var/tmp.

sudo mv /var/tmp /var/tmpold
sudo ln -s /tmp /var/tmp
sudo cp -prf /var/tmpold/\* /tmp/
sudo rm -rf /var/tmpold/


---

