<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>logIt &#187; compile</title>
	<atom:link href="https://lakm.us/logit/tag/compile/feed/" rel="self" type="application/rss+xml" />
	<link>https://lakm.us/logit</link>
	<description>Log Around The Clock</description>
	<lastBuildDate>Sat, 06 Jun 2015 14:17:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Cross-Compiling for Ubuntu ARM by ffmpeg Example</title>
		<link>https://lakm.us/logit/2012/11/cross-compiling-ubuntu-arm-ffmpeg/</link>
		<comments>https://lakm.us/logit/2012/11/cross-compiling-ubuntu-arm-ffmpeg/#comments</comments>
		<pubDate>Mon, 05 Nov 2012 10:02:03 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[ARM Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ARMv7]]></category>
		<category><![CDATA[BeagleBoard]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[make-install]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=409</guid>
		<description><![CDATA[This has been a delayed post since I only figure out how to solve configure error just now. It wasn&#8217;t really necessary to cross-compile last year because compiling ffmpeg directly on the ARM-board finished overnight (despite the low CPU). Anyway, in this post I&#8217;m still using the board to easily retrieve package dependencies from Ubuntu [...]]]></description>
				<content:encoded><![CDATA[<p>This has been a delayed post since I only figure out how to solve <code>configure</code> error just now. It wasn&#8217;t really necessary to cross-compile last year because compiling <code><a href="https://ffmpeg.org/" title="FFMPEG" target="_blank">ffmpeg</a></code> directly on the ARM-board finished overnight (despite the low CPU). Anyway, in this post I&#8217;m still using the board to easily retrieve package dependencies from Ubuntu ARM repository. Toolchain used is <code>arm-linux-gnueabi-gcc-</code>. The following steps will apply in general:</p>
<ol>
<li> download source file (that is <code>ffmpeg</code> in this example)</li>
<li>retrieve development library/build dependecies</li>
<li>place header files and dependency libraries into toolchain path</li>
<li><code>configure</code> with toolchain</li>
<li><code>make</code> and create <code>.deb</code> installer package with <code>checkinstall</code></li>
</ol>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="cross-compile-desktop-and-arm-board-illustration.png" src="../../../../images/cross-compile-desktop-and-arm-board-illustration.png" title="cross-compile: what&#039;s done on desktop &#038; what&#039;s done on ARM-board" width="350" height="207" /><p class="wp-caption-text">cross-compile: Illustration of what&#039;s done on ARM-board and what&#039;s  done on desktop</p></div>
<p>Prior to anything, install <a href="http://www.linaro.org/" title="Linaro" target="_blank">Linaro</a> toolchain by adding their repo first:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> add-apt-repository ppa:linaro-maintainers<span style="color: #000000; font-weight: bold;">/</span>toolchain
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> gcc-arm-linux-gnueabi</pre></div></div>

<p>A complete guide on how to compile ffmpeg can be found in their <a href="https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideLucid" title="Compile FFmpeg on Ubuntu Lucid Lynx 10.04 LTS" target="_blank">wiki</a>. It applies generally. So, I&#8217;ll just skip to following <code>configure</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>ubuntu-desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--cross-prefix</span>=arm-linux-gnueabi- <span style="color: #660033;">--enable-cross-compile</span> <span style="color: #660033;">--target-os</span>=linux <span style="color: #660033;">--arch</span>=arm  <span style="color: #660033;">--cpu</span>=cortex-a8 <span style="color: #660033;">--extra-cflags</span>=<span style="color: #ff0000;">'-march=armv7-a -mfpu=neon -mfloat-abi=softfp'</span> <span style="color: #660033;">--enable-libtheora</span></pre></div></div>

<p><span id="more-409"></span></p>
<p>As an example, the above configure requires <a href="http://www.theora.org/downloads/" title="Theora" target="_blank">Theora</a> libraries. <code><a href="http://packages.ubuntu.com/lucid/libtheora-dev" title="http://packages.ubuntu.com/oneiric/libtheora-dev" target="_blank">libtheora-dev</a></code> itself requires <code>libogg-dev</code>. Use <code>apt-get</code> on the board to get them from Ubuntu ARM repository. Get the <code>.deb</code> files from <code>/var/cache/apt/archives/</code> of the ARM-board to your desktop and extract them as <code>root</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ubuntu-desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-x</span> libogg-dev_1.2.2~dfsg-1ubuntu1_armel.deb <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>cross-compile
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ubuntu-desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-x</span> libtheora-dev_1.1.1+dfsg.1-<span style="color: #000000;">3</span>_armel.deb <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>cross-compile</pre></div></div>

<p>The above <code>/usr/local/cross-compile</code> is just a temporary directory. The toolchain needs header files and dependency libraries to be placed inside <code>/usr/arm-linux-gnueabi/include/</code> and <code>/usr/arm-linux-gnueabi/lib/</code> consecutively. In my case I created the following link for header&#8217;s <code>include</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ubuntu-desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>arm-linux-gnueabi<span style="color: #000000; font-weight: bold;">/</span>include
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ubuntu-desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>cross-compile<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>theora
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>ubuntu-desktop<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>cross-compile<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include<span style="color: #000000; font-weight: bold;">/</span>ogg</pre></div></div>

<p>and copied these from <code>/usr/local/cross-compile/usr/lib</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">libogg.a
libogg.so
libtheora.a
libtheoradec.a
libtheoradec.la
libtheoradec.so
libtheoraenc.a
libtheoraenc.la
libtheoraenc.so
libtheora.la
libtheora.so</pre></div></div>

<p>After successful <code>configure</code>, run <code>make</code> (this will take some time), and then pack the whole working directory to the ARM-board. Instead of doing <code>make install</code> in the ARM-board, use <code>checkinstall</code> to install and create the <code>.deb</code> package. This way we can make use of <code>dpkg</code> to uninstall or re-install in the manner of package manager.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>beagleboard<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> checkinstall <span style="color: #660033;">--pkgname</span>=<span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">--pkgversion</span>=<span style="color: #ff0000;">&quot;5:<span style="color: #007800;">$(./version.sh)</span>&quot;</span> \
     <span style="color: #660033;">--backup</span>=no <span style="color: #660033;">--deldoc</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span> <span style="color: #660033;">--default</span></pre></div></div>

<p>Please mind that even if we put &#8220;<code>--install=no</code>&#8220;, the above <code>checkinstall</code> will overwrite all <code>ffmpeg</code> binaries in <code>/usr/local/bin/</code>. This is the reason why I move the process to the ARM-board: to keep other running version on my desktop stays as it is.</p>
<p>Check the test of streaming from our cross-compiled <code>ffmpeg</code> in previous <a href="./2012/11/simple-ffmpeg-udp-video-streaming-from-beagleboard-running-ubuntu" title="Simple FFMPEG UDP Video Streaming" target="_blank">post</a>.</p>
<h1>A Little History</h1>
<p>When first attempt to <code>configure</code> exited with <code>ERROR: libtheora not found</code>, I found the following test failed in the output log:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">$ arm<span style="color: #339933;">-</span>linux<span style="color: #339933;">-</span>gnueabi<span style="color: #339933;">-</span>gcc <span style="color: #339933;">-</span>D_ISOC99_SOURCE <span style="color: #339933;">-</span>D_FILE_OFFSET_BITS<span style="color: #339933;">=</span><span style="color: #0000dd;">64</span> <span style="color: #339933;">-</span>D_LARGEFILE_SOURCE <span style="color: #339933;">-</span>D_POSIX_C_SOURCE<span style="color: #339933;">=</span><span style="color: #0000dd;">200112</span> <span style="color: #339933;">-</span>D_XOPEN_SOURCE<span style="color: #339933;">=</span><span style="color: #0000dd;">600</span> <span style="color: #339933;">-</span>march<span style="color: #339933;">=</span>armv7<span style="color: #339933;">-</span>a <span style="color: #339933;">-</span>mfpu<span style="color: #339933;">=</span>neon <span style="color: #339933;">-</span>mfloat<span style="color: #339933;">-</span>abi<span style="color: #339933;">=</span>softfp <span style="color: #339933;">-</span>mcpu<span style="color: #339933;">=</span>cortex<span style="color: #339933;">-</span>a8 <span style="color: #339933;">-</span>std<span style="color: #339933;">=</span>c99 <span style="color: #339933;">-</span>fomit<span style="color: #339933;">-</span>frame<span style="color: #339933;">-</span>pointer <span style="color: #339933;">-</span>marm <span style="color: #339933;">-</span>pthread <span style="color: #339933;">-</span>E <span style="color: #339933;">-</span>o <span style="color: #339933;">/</span>tmp<span style="color: #339933;">/</span>ffconf.<span style="color: #202020;">UdYctJgq</span>.<span style="color: #202020;">o</span> <span style="color: #339933;">/</span>tmp<span style="color: #339933;">/</span>ffconf.<span style="color: #202020;">mwXpf9Tl</span>.<span style="color: #202020;">c</span>
...
<span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>lib<span style="color: #339933;">/</span>gcc<span style="color: #339933;">/</span>arm<span style="color: #339933;">-</span>linux<span style="color: #339933;">-</span>gnueabi<span style="color: #339933;">/</span>4.6.1<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>arm<span style="color: #339933;">-</span>linux<span style="color: #339933;">-</span>gnueabi<span style="color: #339933;">/</span>bin<span style="color: #339933;">/</span>ld<span style="color: #339933;">:</span> cannot find <span style="color: #339933;">-</span>ltheoraenc
<span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>lib<span style="color: #339933;">/</span>gcc<span style="color: #339933;">/</span>arm<span style="color: #339933;">-</span>linux<span style="color: #339933;">-</span>gnueabi<span style="color: #339933;">/</span>4.6.1<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>arm<span style="color: #339933;">-</span>linux<span style="color: #339933;">-</span>gnueabi<span style="color: #339933;">/</span>bin<span style="color: #339933;">/</span>ld<span style="color: #339933;">:</span> cannot find <span style="color: #339933;">-</span>ltheoradec
<span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>lib<span style="color: #339933;">/</span>gcc<span style="color: #339933;">/</span>arm<span style="color: #339933;">-</span>linux<span style="color: #339933;">-</span>gnueabi<span style="color: #339933;">/</span>4.6.1<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>arm<span style="color: #339933;">-</span>linux<span style="color: #339933;">-</span>gnueabi<span style="color: #339933;">/</span>bin<span style="color: #339933;">/</span>ld<span style="color: #339933;">:</span> cannot find <span style="color: #339933;">-</span>logg</pre></div></div>

<p>What was inside the above temporary file (<code>/tmp/ffconf.mwXpf9Tl.c</code>):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;theora/theoraenc.h&gt;</span>
<span style="color: #993333;">int</span> x<span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>You can run that test to check whether all dependencies are met.</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2012/11/cross-compiling-ubuntu-arm-ffmpeg/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Compile Zabbix Proxy in Ubuntu ARM (BeagleBoard)</title>
		<link>https://lakm.us/logit/2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/</link>
		<comments>https://lakm.us/logit/2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/#comments</comments>
		<pubDate>Tue, 17 Jul 2012 08:28:57 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[ARM Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ARMv7]]></category>
		<category><![CDATA[BeagleBoard]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[embedded system]]></category>
		<category><![CDATA[make-install]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[workaround]]></category>
		<category><![CDATA[Zabbix]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=401</guid>
		<description><![CDATA[I needed to tackle practical limitation of SNMP monitoring under unreliable communication, a serious consideration was made for Zabbix Proxy. It was an option said to be ready for embedded hardware. I already had BeagleBoard xM Rev C running Ubuntu 11.10 Oneiric and needed to proof that it would port functionally to this Linux ARM [...]]]></description>
				<content:encoded><![CDATA[<p>I needed to tackle practical limitation of SNMP monitoring under unreliable communication, a serious consideration was made for <a href="http://www.zabbix.com/documentation/1.8/manual/processes/zabbix_proxy" title="Zabbix Proxy" target="_blank">Zabbix Proxy</a>. It was an option said to be <a href="http://www.zabbix.com/documentation/1.8/manual/proxies/proxy_vs_node" title="Zabbix: Proxy vs Node" target="_blank">ready for embedded hardware</a>. I already had BeagleBoard xM Rev C running <a href="./2011/12/ubuntu-on-beagleboard-xm-with-easycap-video-capture-compiling-driver/" title="Ubuntu on Beagleboard xM" target="_blank">Ubuntu 11.10 Oneiric</a> and needed to proof that it would port functionally to this Linux ARM board. There existed <code>zabbix-proxy-mysql</code> in <a href="https://launchpad.net/ubuntu/oneiric/armel/zabbix-proxy-mysql/1:1.8.5-1ubuntu2" title="armel zabbix-proxy-mysql" target="_blank">Oneiric repository</a>, but <code><a href="http://www.sqlite.org/" title="SQLite" target="_blank">sqlite</a></code> seemed to be a better scale option for embedded deployment.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="zabbix-proxy-abstract-illustration.png" src="../../../../images/zabbix-proxy-abstract-illustration.png" title="Zabbix Proxy Distributed NMS" width="330" height="253" /><p class="wp-caption-text">Zabbix Proxy Distributed NMS</p></div>
<p>An example set out for <a href="http://www.zabbix.com/wiki/howto/install/debian/zabbix_proxy_on_debian_sqlite" title="Wiki: Zabbix Proxy on Debian using sqlite" target="_blank">Zabbix Proxy on Debian</a> appears to be pretty straightforward to follow. With the ARM board already installed with <code>build-essential</code>, <code>snmp</code>, and <code>snmpd</code>, the following needs to be added:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libsnmp-dev libcurl4-openssl-dev fping curl sqlite libsqlite3-dev ntpdate</pre></div></div>

<p>then start the pre-compilation <code>configure</code> (in this case <a href="http://www.zabbix.com/rn1.8.7.php" title="Zabbix 1.8.7" target="_blank">Zabbix 1.8.7</a> is used):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> zabbix-1.8.7
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-proxy</span> <span style="color: #660033;">--enable-agent</span> <span style="color: #660033;">--with-sqlite3</span> <span style="color: #660033;">--with-net-snmp</span> <span style="color: #660033;">--with-libcurl</span></pre></div></div>

<p>It will go smooth. However, during <code>make</code> there are complains about undefined references to &#8216;<code>sqlite3_open</code>&#8216;, &#8216;<code>sqlite3_close</code>&#8216;, etc.:</p>
<p><span id="more-401"></span></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_connect<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:331: undefined reference to `sqlite3_open'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">343</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_busy_timeout<span style="color: #ff0000;">'
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:334: undefined reference to `sqlite3_errmsg'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">335</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_close<span style="color: #ff0000;">'
../../src/libs/zbxdb/libzbxdb.a(db.o): In function `zbx_db_init'</span><span style="color: #339933;">:</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">385</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_open<span style="color: #ff0000;">'
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:387: undefined reference to `sqlite3_errmsg'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_close<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:446: undefined reference to `sqlite3_close'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_vexecute<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:827: undefined reference to `sqlite3_exec'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">852</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_changes<span style="color: #ff0000;">'
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:833: undefined reference to `sqlite3_free'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `SQ_DBfree_result<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:1363: undefined reference to `sqlite3_free_table'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_vselect<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:1121: undefined reference to `sqlite3_get_table'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">1127</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_free<span style="color: #ff0000;">'</span></pre></div></div>

<p>this is obviously from the database related code compilation. I run the <code>gcc</code> manually for the <code>db.c</code> file inside its directory by adding the flag &#8216;<code>-lsqlite3</code>&#8216; in the tail of &#8216;<code>../../src/libs/zbxdb/libzbxdb.a</code>&#8216; to make it work. Afterward by going to the initial directory first, running <code>make</code> again will then continue successfully.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> src<span style="color: #000000; font-weight: bold;">/</span>zabbix_proxy
$ <span style="color: #c20cb9; font-weight: bold;">gcc</span> -DZABBIX_DAEMON <span style="color: #660033;">-g</span> <span style="color: #660033;">-O2</span>     -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>arm-linux-gnueabi    -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>include -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.12</span><span style="color: #000000; font-weight: bold;">/</span>CORE -I. -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include      -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include <span style="color: #660033;">-lsqlite3</span>  -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>arm-linux-gnueabi <span style="color: #660033;">-lcurl</span>  -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">-lnetsnmp</span> <span style="color: #660033;">-lcrypto</span>  -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">-lnetsnmp</span> <span style="color: #660033;">-lcrypto</span>   <span style="color: #660033;">-rdynamic</span>    <span style="color: #660033;">-o</span> zabbix_proxy zabbix_proxy-servercomms.o zabbix_proxy-events.o zabbix_proxy-zlog.o zabbix_proxy-proxy.o heart<span style="color: #000000; font-weight: bold;">/</span>libzbxheart.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>dbsyncer<span style="color: #000000; font-weight: bold;">/</span>libzbxdbsyncer.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>discoverer<span style="color: #000000; font-weight: bold;">/</span>libzbxdiscoverer.a housekeeper<span style="color: #000000; font-weight: bold;">/</span>libzbxhousekeeper.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>httppoller<span style="color: #000000; font-weight: bold;">/</span>libzbxhttppoller.a proxyconfig<span style="color: #000000; font-weight: bold;">/</span>libzbxproxyconfig.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>pinger<span style="color: #000000; font-weight: bold;">/</span>libzbxpinger.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>poller<span style="color: #000000; font-weight: bold;">/</span>libzbxpoller.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>trapper<span style="color: #000000; font-weight: bold;">/</span>libzbxtrapper.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>nodewatcher<span style="color: #000000; font-weight: bold;">/</span>libzbxnodewatcher.a datasender<span style="color: #000000; font-weight: bold;">/</span>libzbxdatasender.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>selfmon<span style="color: #000000; font-weight: bold;">/</span>libzbxselfmon.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>libzbxserversysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>libspecsysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>libcommonsysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>simple<span style="color: #000000; font-weight: bold;">/</span>libsimplesysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxlog<span style="color: #000000; font-weight: bold;">/</span>libzbxlog.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxdbcache<span style="color: #000000; font-weight: bold;">/</span>libzbxdbcache.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxmemory<span style="color: #000000; font-weight: bold;">/</span>libzbxmemory.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxalgo<span style="color: #000000; font-weight: bold;">/</span>libzbxalgo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxnix<span style="color: #000000; font-weight: bold;">/</span>libzbxnix.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsys<span style="color: #000000; font-weight: bold;">/</span>libzbxsys.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxconf<span style="color: #000000; font-weight: bold;">/</span>libzbxconf.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcommon<span style="color: #000000; font-weight: bold;">/</span>libzbxcommon.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcrypto<span style="color: #000000; font-weight: bold;">/</span>libzbxcrypto.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcomms<span style="color: #000000; font-weight: bold;">/</span>libzbxcomms.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcommshigh<span style="color: #000000; font-weight: bold;">/</span>libzbxcommshigh.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxjson<span style="color: #000000; font-weight: bold;">/</span>libzbxjson.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxexec<span style="color: #000000; font-weight: bold;">/</span>libzbxexec.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxself<span style="color: #000000; font-weight: bold;">/</span>libzbxself.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxserver<span style="color: #000000; font-weight: bold;">/</span>libzbxserver.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxicmpping<span style="color: #000000; font-weight: bold;">/</span>libzbxicmpping.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxdbhigh<span style="color: #000000; font-weight: bold;">/</span>libzbxdbhigh.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxdb<span style="color: #000000; font-weight: bold;">/</span>libzbxdb.a <span style="color: #660033;">-lsqlite3</span> <span style="color: #660033;">-lcurl</span>  <span style="color: #660033;">-lnetsnmp</span>    <span style="color: #660033;">-lm</span>  <span style="color: #660033;">-lresolv</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
