<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Issues during pc-ble-driver build</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17794/issues-during-pc-ble-driver-build</link><description>I am following this tutorial to be able to run the ble_connectovity example on the Nordic: github.com/.../pc-ble-driver 
 I can build and install Boost and cmake runs successfully. However, when I hit &amp;quot;make&amp;quot; I get the following error: before I dig in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Nov 2016 16:54:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17794/issues-during-pc-ble-driver-build" /><item><title>RE: Issues during pc-ble-driver build</title><link>https://devzone.nordicsemi.com/thread/68586?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 16:54:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4ad1d6e-025b-40f2-863b-36846486f6c8</guid><dc:creator>dbuijsma</dc:creator><description>&lt;p&gt;Argh, can&amp;#39;t believe I missed that....thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues during pc-ble-driver build</title><link>https://devzone.nordicsemi.com/thread/68585?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2016 08:09:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c71473b2-31cb-453f-84fb-daee82ccfa3e</guid><dc:creator>Bj&amp;#248;rn Inge</dc:creator><description>&lt;p&gt;You are missing some flags in your boost build command. Here is from the README: &lt;code&gt;$ ./b2 toolset=gcc cxxflags=-fPIC cflags=-fPIC address-model=64 link=static --with-thread --with-system --with-regex --with-date_time --with-chrono&lt;/code&gt;&lt;br /&gt;
Try rebuilding boost with the extra flags.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues during pc-ble-driver build</title><link>https://devzone.nordicsemi.com/thread/68584?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2016 08:27:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01c9c4f9-7fe7-4d91-ad85-742a7537a39b</guid><dc:creator>Bj&amp;#248;rn Inge</dc:creator><description>&lt;p&gt;Hi, I&amp;#39;m not able to see anything wrong with your setup. I get the same output when running cmake, and running make afterwards works fine on our machines. I&amp;#39;m not sure what the issue could be here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues during pc-ble-driver build</title><link>https://devzone.nordicsemi.com/thread/68583?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 17:14:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:828de646-7702-496f-84b1-b0805730dad7</guid><dc:creator>dbuijsma</dc:creator><description>&lt;p&gt;This is my cmake command line:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cmake -B. -H.. -G &amp;quot;Unix Makefiles&amp;quot; -DBOOST_ROOT=&amp;quot;/home/userx/tools/boost_1_61_0&amp;quot;  -DBOOST_INCLUDEDIR=&amp;quot;/home/userx/tools/boost_1_61_0_install/include&amp;quot;  -DBOOST_LIBRARYDIR=/home/userx/tools/boost_1_61_0_install/lib
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here is the stdout:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Architecture not set, using native 64-bit toolchain.
-- Building with build type: .
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.61.0
-- Found the following Boost libraries:
--   thread
--   system
--   regex
--   date_time
--   chrono
--   atomic
-- Found Git: /usr/bin/git (found version &amp;quot;2.7.4&amp;quot;) 
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/hgfs/userx/git/nordic/pc-ble-driver/build
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Update #1 2016_11_28:&lt;/strong&gt;
The original cmake issue might have had something todo with my files being located on a shared directory (Xubuntu is running in a VM). I redid the install/build process in a local directory and get a lot further....but the build still fails when it is trying to create &amp;quot;libpc_ble_driver_shared_sd_api_v3.so&amp;quot;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[ 21%] Building CXX object CMakeFiles/pc_ble_driver_obj_sd_api_v3.dir/src/common/platform/linux/serial_port_enum.cpp.o
[ 21%] Built target pc_ble_driver_obj_sd_api_v3
Scanning dependencies of target pc_ble_driver_static_sd_api_v3
[ 21%] Linking CXX static library libpc_ble_driver_static_sd_api_v3.a
[ 21%] Built target pc_ble_driver_static_sd_api_v3
Scanning dependencies of target pc_ble_driver_shared_sd_api_v3
[ 21%] Linking CXX shared library libpc_ble_driver_shared_sd_api_v3.so
/usr/bin/ld: /home/userx/tools/boost_1_61_0/stage/lib/libboost_thread.a(thread.o): relocation R_X86_64_32 against `.rodata.str1.8&amp;#39; can not be used when making a shared object; recompile with -fPIC
/home/userx/tools/boost_1_61_0/stage/lib/libboost_thread.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/pc_ble_driver_shared_sd_api_v3.dir/build.make:147: recipe for target &amp;#39;libpc_ble_driver_shared_sd_api_v3.so&amp;#39; failed
make[2]: *** [libpc_ble_driver_shared_sd_api_v3.so] Error 1
CMakeFiles/Makefile2:104: recipe for target &amp;#39;CMakeFiles/pc_ble_driver_shared_sd_api_v3.dir/all&amp;#39; failed
make[1]: *** [CMakeFiles/pc_ble_driver_shared_sd_api_v3.dir/all] Error 2
Makefile:83: recipe for target &amp;#39;all&amp;#39; failed
make: *** [all] Error 2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It looks like the problem is with my BOOST install, but I would expect cmake to catch that. Could you check if you see anything wrong with it?
These are ALL steps I used in my build process:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tar -xzf boost_1_61_0.tar.gz
cd boost_1_61_0
mkdir ~/pool
./bootstrap.sh --prefix=$HOME/pool --libdir=$HOME/pool/lib --with-libraries=&amp;quot;thread,system,regex,date_time,chrono,atomic&amp;quot;
./b2
./b2 install
cd ~/projects/test/nordic/test/pc-ble-driver/build
cmake -B. -H.. -G &amp;quot;Unix Makefiles&amp;quot; -DBOOST_ROOT=&amp;quot;~/pool&amp;quot;  -DBOOST_INCLUDEDIR=&amp;quot;~/pool&amp;quot;  -DBOOST_LIBRARYDIR=&amp;quot;~/pool/lib&amp;quot;
make
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Directory listing:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;userx@userx-vm:~/projects/test/nordic/test/pc-ble-driver/build$ ll ~/pool/lib/
total 5088
drwxrwxr-x 2 userx userx    4096 Nov 28 11:28 ./
drwxrwxr-x 4 userx userx    4096 Nov 28 11:28 ../
-rw-rw-r-- 1 userx userx    2706 Nov 28 11:28 libboost_atomic.a
lrwxrwxrwx 1 userx userx      25 Nov 28 11:28 libboost_atomic.so -&amp;gt; libboost_atomic.so.1.61.0*
-rwxrwxr-x 1 userx userx    8160 Nov 28 11:28 libboost_atomic.so.1.61.0*
-rw-rw-r-- 1 userx userx  124822 Nov 28 11:28 libboost_chrono.a
lrwxrwxrwx 1 userx userx      25 Nov 28 11:28 libboost_chrono.so -&amp;gt; libboost_chrono.so.1.61.0*
-rwxrwxr-x 1 userx userx   36848 Nov 28 11:28 libboost_chrono.so.1.61.0*
-rw-rw-r-- 1 userx userx  167576 Nov 28 11:28 libboost_date_time.a
lrwxrwxrwx 1 userx userx      28 Nov 28 11:28 libboost_date_time.so -&amp;gt; libboost_date_time.so.1.61.0*
-rwxrwxr-x 1 userx userx   98816 Nov 28 11:28 libboost_date_time.so.1.61.0*
-rw-rw-r-- 1 userx userx 2866496 Nov 28 11:28 libboost_regex.a
lrwxrwxrwx 1 userx userx      24 Nov 28 11:28 libboost_regex.so -&amp;gt; libboost_regex.so.1.61.0*
-rwxrwxr-x 1 userx userx 1222904 Nov 28 11:28 libboost_regex.so.1.61.0*
-rw-rw-r-- 1 userx userx   48046 Nov 28 11:28 libboost_system.a
lrwxrwxrwx 1 userx userx      25 Nov 28 11:28 libboost_system.so -&amp;gt; libboost_system.so.1.61.0*
-rwxrwxr-x 1 userx userx   19976 Nov 28 11:28 libboost_system.so.1.61.0*
-rw-rw-r-- 1 userx userx  373382 Nov 28 11:28 libboost_thread.a
lrwxrwxrwx 1 userx userx      25 Nov 28 11:28 libboost_thread.so -&amp;gt; libboost_thread.so.1.61.0*
-rwxrwxr-x 1 userx userx  216264 Nov 28 11:28 libboost_thread.so.1.61.0*
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Update #2 2016_11_28:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The following &amp;quot;fixes&amp;quot; the build:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sed -i &amp;#39;s/\.a/\.so/g&amp;#39; CMakeFiles/pc_ble_driver_shared_sd_api_v2.dir/link.txt
sed -i &amp;#39;s/\.a/\.so/g&amp;#39; CMakeFiles/pc_ble_driver_shared_sd_api_v3.dir/link.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Not sure what can cause this, but at this point I believe it&amp;#39;s something with cmake itself (?)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues during pc-ble-driver build</title><link>https://devzone.nordicsemi.com/thread/68582?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 13:41:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59550477-aaa8-41f6-9eae-196aa7841183</guid><dc:creator>Bj&amp;#248;rn Inge</dc:creator><description>&lt;p&gt;The system and toolchain you are running on should be able to compile pc-ble-driver without problems. We have run successfully on a similar Xubuntu system.&lt;/p&gt;
&lt;p&gt;Could you show the exact cmake command you are running?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>