<p>I realize this question is 8 months old but this information may be of value to others seeking a resolution to a segfault as there seems to be no information available at all on the problem. The APP SDK seems to be incompatible with ATI legacy drivers.</p>

<p>The APP SDK is probably causing the segfault. I have a HD4770 and it was working with a pre-compiled copy of cgminer.</p>

<p>When I installed the APP SDK to compile sgminer everything seemed ok, sgminer compiled ok</p>

<p>However is gave me a segfault and when I tried to run cgminer that was working it too gave me a segfault.</p>

<p>After 3 days, I have been unable to restore things the way they were and undo the changes the APP SDK install made.</p>

<p>I fear that a complete OS reinstall will be my only solution.</p>

<p>Also. the flags '-march=native' enables special cryptographic instructions that are incompatible with AMD CPU's before Bulldozer.</p>

CC BY-SA 3.0
2014-05-21T22:47:12.373Z
2014-05-21T22:52:32.713Z
2014-05-21T22:52:32.713Z
Jim
<p>before the cflags command u forgot "./autogen.sh --enable-scrypt --enable-opencl" </p>

<p>those two links were very helpful to me :</p>

<p><a href="https://litecointalk.org/index.php?topic=2924.msg44380#msg44380" rel="nofollow">https://litecointalk.org/index.php?topic=2924.msg44380#msg44380</a></p>

<p><a href="https://litecointalk.org/index.php/topic,2542.0.html" rel="nofollow">https://litecointalk.org/index.php/topic,2542.0.html</a></p>

CC BY-SA 3.0
2013-12-08T18:39:13.507Z
https://litecointalk.org/index.php/topic,2542.0.html
itsJustMe
CC BY-SA 3.0
2013-12-08T14:59:20.913Z
2013-12-08T18:41:03.967Z
2013-12-08T18:41:03.967Z
itsJustMe
<p>I recently wanted to try mining some crypto-currency, and litecoin seemed to be a good way to start since it doesn't require too specific hardware.
However, running cgminer after install (which was completed without errors) ends in Segfault.</p>

<p>Machine configuration :
Ubuntu 10.04
ATI Mobility Radeon HD 4500 series</p>

<p>I might be missing some packages, since no tutorial has the same list, but since the install didn't complain, I assumed everything was OK.</p>

<p>The steps used so far :</p>

<ul>
<li>got the cgminer-3.7.2 x86_64.tar.bz2 (seems to be the last that supports GPU mining)</li>
<li>installed AMD APP SDK 2.9</li>
<li>mkdir amdapp_2-9
<ul>
<li>cd amdapp_2-8</li>
<li>tar -zxvf ~/Downloads/AMD-APP-SDK-v2.9-lnx64.tgz</li>
<li>sudo ./Install-AMD-APP.sh</li>
<li>sudo reboot</li>
</ul></li>
<li>installed ADL SDK 6.0
<ul>
<li>mkdir ADL_SDK</li>
<li>cd ADL_SDK</li>
<li>mv ~/Downloads/ADL_SDK_6.0.zip .</li>
<li>unzip ADL_SDK_6.0.zip</li>
<li>cp include/* ../cgminer/ADL_SDK</li>
</ul></li>
<li>installed cgminer
<ul>
<li>CFLAGS="-O2 -Wall -march=native -I /opt/AMDAPP/include/" LDFLAGS="-L/opt/AMDAPP/lib/x86_64" ./configure --enable-opencl --enable-scrypt</li>
<li>make</li>
<li>make install</li>
</ul></li>
<li>did some exports
<ul>
<li>export DISPLAY=:0</li>
<li>export GPU_USE_SYNC_OBJECTS=1</li>
<li>export GPU_MAX_ALLOC_PERCENT=100</li>
</ul></li>
</ul>

<p>And finally, I wanted to test via</p>

<pre><code>./cgminer -n
</code></pre>

<p>That failed miserably, as all I got was a Segfault.</p>

<p>Here is the result of the configuration step :</p>

<pre><code>cgminer 3.7.2
------------------------------------------------------------------------


Configuration Options Summary:

libcurl(GBT+getwork).: Enabled: -lcurl  
curses.TUI...........: FOUND: -lncurses
OpenCL...............: FOUND. GPU mining support enabled
scrypt...............: Enabled
ADL..................: SDK found, GPU monitoring support enabled

Avalon.ASICs.........: Disabled
BFL.ASICs............: Disabled
KnC.ASICs............: Disabled
BitForce.FPGAs.......: Disabled
BitFury.ASICs........: Disabled
Hashfast.ASICs.......: Disabled
Icarus.ASICs/FPGAs...: Disabled
Klondike.ASICs.......: Disabled
ModMiner.FPGAs.......: Disabled

Compilation............: make (or gmake)
CPPFLAGS.............: 
CFLAGS...............: -O2 -Wall -march=native -I /opt/AMDAPP/include/
LDFLAGS..............: -L/opt/AMDAPP/lib/x86_64 -lpthread
LDADD................:  -lcurl   compat/jansson-2.5/src/.libs/libjansson.a -lpthread -L/opt/AMDAPP/lib/x86_64 -lOpenCL    -lm  -lrt

Installation...........: make install (as root if needed, with 'su' or 'sudo')
prefix...............: /usr/local
</code></pre>

CC BY-SA 3.0
2013-12-20T05:59:43.177Z
Did you install catalyst drivers and just not mention that step?
Oliver
<litecoin><ubuntu><cgminer><gpu>
Segfault when attempting to run cgminer on ubuntu 10.04
l0r3nz4cc10
# Segfault when attempting to run cgminer on ubuntu 10.04

(Asked by: username_0 on 2013-12-08)

I recently wanted to try mining some crypto-currency, and litecoin seemed to be a good way to start since it doesn't require too specific hardware.
However, running cgminer after install (which was completed without errors) ends in Segfault.

Machine configuration :
Ubuntu 10.04
ATI Mobility Radeon HD 4500 series

I might be missing some packages, since no tutorial has the same list, but since the install didn't complain, I assumed everything was OK.

The steps used so far :

* got the cgminer-3.7.2 x86\_64.tar.bz2 (seems to be the last that supports GPU mining)
* installed AMD APP SDK 2.9
* mkdir amdapp\_2-9
  + cd amdapp\_2-8
  + tar -zxvf ~/Downloads/AMD-APP-SDK-v2.9-lnx64.tgz
  + sudo ./Install-AMD-APP.sh
  + sudo reboot
* installed ADL SDK 6.0
  + mkdir ADL\_SDK
  + cd ADL\_SDK
  + mv ~/Downloads/ADL\_SDK\_6.0.zip .
  + unzip ADL\_SDK\_6.0.zip
  + cp include/\* ../cgminer/ADL\_SDK
* installed cgminer
  + CFLAGS="-O2 -Wall -march=native -I /opt/AMDAPP/include/" LDFLAGS="-L/opt/AMDAPP/lib/x86\_64" ./configure --enable-opencl --enable-scrypt
  + make
  + make install
* did some exports
  + export DISPLAY=:0
  + export GPU\_USE\_SYNC\_OBJECTS=1
  + export GPU\_MAX\_ALLOC\_PERCENT=100

And finally, I wanted to test via

```
./cgminer -n

```

That failed miserably, as all I got was a Segfault.

Here is the result of the configuration step :

```
cgminer 3.7.2
------------------------------------------------------------------------

Configuration Options Summary:

libcurl(GBT+getwork).: Enabled: -lcurl  
curses.TUI...........: FOUND: -lncurses
OpenCL...............: FOUND. GPU mining support enabled
scrypt...............: Enabled
ADL..................: SDK found, GPU monitoring support enabled

Avalon.ASICs.........: Disabled
BFL.ASICs............: Disabled
KnC.ASICs............: Disabled
BitForce.FPGAs.......: Disabled
BitFury.ASICs........: Disabled
Hashfast.ASICs.......: Disabled
Icarus.ASICs/FPGAs...: Disabled
Klondike.ASICs.......: Disabled
ModMiner.FPGAs.......: Disabled

Compilation............: make (or gmake)
CPPFLAGS.............: 
CFLAGS...............: -O2 -Wall -march=native -I /opt/AMDAPP/include/
LDFLAGS..............: -L/opt/AMDAPP/lib/x86_64 -lpthread
LDADD................:  -lcurl   compat/jansson-2.5/src/.libs/libjansson.a -lpthread -L/opt/AMDAPP/lib/x86_64 -lOpenCL    -lm  -lrt

Installation...........: make install (as root if needed, with 'su' or 'sudo')
prefix...............: /usr/local

```

**Tags:** litecoin, ubuntu, cgminer, gpu

> **Comments:**
> **username_1**: Did you install catalyst drivers and just not mention that step?  

---

## 2 answers

### Answer by username_2 on 2014-05-21. Score: 1

I realize this question is 8 months old but this information may be of value to others seeking a resolution to a segfault as there seems to be no information available at all on the problem. The APP SDK seems to be incompatible with ATI legacy drivers.

The APP SDK is probably causing the segfault. I have a HD4770 and it was working with a pre-compiled copy of cgminer.

When I installed the APP SDK to compile sgminer everything seemed ok, sgminer compiled ok

However is gave me a segfault and when I tried to run cgminer that was working it too gave me a segfault.

After 3 days, I have been unable to restore things the way they were and undo the changes the APP SDK install made.

I fear that a complete OS reinstall will be my only solution.

Also. the flags '-march=native' enables special cryptographic instructions that are incompatible with AMD CPU's before Bulldozer.


---

### Answer by username_3 on 2013-12-08. Score: -1

before the cflags command u forgot "./autogen.sh --enable-scrypt --enable-opencl"

those two links were very helpful to me :

<https://litecointalk.org/index.php?topic=2924.msg44380#msg44380>

<https://litecointalk.org/index.php/topic,2542.0.html>

> **Comments:**
> **username_3**: https://litecointalk.org/index.php/topic,2542.0.html  

---

