Cross Compiling Apache For ARM Problems - apache

I am trying to cross compile Apache for an ARM system using an Ubuntu 14.04 32-bit VM. I was able to get all of the required libraries built (PCRE, APR, APR-Util, Libtool) and the configure script will run fine. However, when I run the make command I receive the following errors. At this point I am completely lost as what to do to fix this.
util.c: In function ‘ap_parse_token_list_strict’:
util.c:1528:14: error: ‘T_HTTP_TOKEN_STOP’ undeclared (first use in this
function)
util.c:1528:14: note: each undeclared identifier is reported only once for
each function it appears in
util.c: In function ‘ap_scan_http_field_content’:
util.c:1602:14: error: ‘T_HTTP_CTRLS’ undeclared (first use in this
function)
util.c: In function ‘ap_scan_http_token’:
util.c:1612:14: error: ‘T_HTTP_TOKEN_STOP’ undeclared (first use in this
function)
util.c: In function ‘ap_scan_vchar_obstext’:
util.c:1622:13: error: ‘T_VCHAR_OBSTEXT’ undeclared (first use in this
function)
util.c: In function ‘ap_find_token’:
util.c:1683:22: error: ‘T_HTTP_TOKEN_STOP’ undeclared (first use in this
function)
util.c: In function ‘ap_escape_logitem’:
util.c:2092:13: error: ‘T_ESCAPE_LOGITEM’ undeclared (first use in this
function)
util.c: In function ‘ap_escape_errorlog_item’:
util.c:2162:13: error: ‘T_ESCAPE_LOGITEM’ undeclared (first use in this
function)
util.c: In function ‘ap_append_pid’:
util.c:2480:25: warning: format ‘%lld’ expects argument of type ‘long long
int’, but argument 5 has type ‘__pid_t’ [-Wformat]
make[2]: *** [util.lo] Error 1
Here is the script I am using to configure
#!/bin/sh
export PATH=$PATH
export ARCH=armv7l
export CROSS_COMPILE=arm-linux-gnueabi-
export CC=arm-linux-gnueabi-gcc
export LD=arm-linux-gnueabi-ld
export LD_LIBRARY=/home/kyle/httpd/srclib/expat/bin
export CXX=arm-linux-gnueabi-g++
export AR=arm-linux-gnueabi-ar
export CPP=arm-linux-gnueabi-cpp
export STRIP=arm-linux-gnueabi-strip
export CC_FOR_BUILD=i686-linux-gnu-gcc
./configure \
--host=arm-linux-gnueabi \
--target=arm-linux-gnueabi \
--prefix=/home/kyle/httpd \
--build=i686-cross-linux-gnu \
--with-apr=/home/kyle/httpd/srclib/apr \
--with-apr-util=/home/kyle/httpd/srclib/apr-util \
--with-pcre=/home/kyle/httpd/srclib/pcre \
--with-expat=/home/kyle/httpd/srclib/expat \
--disable-libtool-lock \
ac_cv_file__dev_zero=no \
ac_cv_func_setpgrp_void=no \
apr_cv_tcp_nodelay_with_cork=no \
ap_cv_void_ptr_lt_long=4 \
ac_cv_sizeof_struct_iovec=1
****EDIT: I believe I have found the solution****
The problem was I was copying over the gen_test_char from APR to get around the known bug with it, but this was not the same gen_test_char as in httpd/server. So a simple workaround is run the make command wait for it to fail because of the gen_test_char being in the wrong format, and then run
gcc gen_test_char.c -I"(where ever apr is)/apr/include" -o gen_test_char
After this run make again and everything should work.

export your toolchain path
export PATH=$PATH:/usr/local/linaro-aarch64-2017.08-gcc7.1/bin
---------------------------------------- Steps for pcre-8.43 ----------------------------------------
tar xvjf pcre-8.43.tar.bz2
cd pcre-8.43
./configure --prefix=/mnt/flash2/apache2_server --host=aarch64-linux-gnu CC=aarch64-linux-gnu-gcc AR=aarch64-linux-gnu-gcc-ar STRIP=aarch64-linux-gnu-strip RANLIB=aarch64-linux-gnu-ranlib
make
make install DESTDIR=/home/ahmcpu2176/Downloads/apache2_server
cd ..
---------------------------------------- Steps for libexpat-R_2_2_9 ----------------------------------------
tar xvzf libexpat-R_2_2_9.tar.gz
cd libexpat-R_2_2_9/expat
./buildconf.sh
./configure --prefix=/mnt/flash2/apache2_server --host=aarch64-linux-gnu CC=aarch64-linux-gnu-gcc AR=aarch64-linux-gnu-gcc-ar STRIP=aarch64-linux-gnu-strip RANLIB=aarch64-linux-gnu-ranlib
make
make install DESTDIR=/home/ahmcpu2176/Downloads/apache2_server
cd ../..
-------------------------- Steps for httpd-2.4.23(apache2 with apr, apr-util, pcre) --------------------------
Download apr-1.5.0 and apr-util-1.6.1 library and extract compressed file into
httpd-2.4.23/srclib
tar xvzf httpd-2.4.23.tar.gz
tar xvzf apr-1.5.0.tar.gz
tar xvjf apr-util-1.6.1.tar.bz2
mv apr-1.5.0 httpd-2.4.23/srclib/apr
mv apr-util-1.6.1 httpd-2.4.23/srclib/apr-util
cd httpd-2.4.23
./configure --prefix=/mnt/flash2/apache2_server --target=aarch64-linux-gnu --host=aarch64-linux-gnu CC=aarch64-linux-gnu-gcc CPP=aarch64-linux-gnu-cpp CXX=aarch64-linux-gnu-c++ AR=aarch64-linux-gnu-gcc-ar STRIP=aarch64-linux-gnu-strip RANLIB=aarch64-linux-gnu-ranlib --with-included-apr --with-pcre=/home/ahmcpu2176/Downloads/pcre-8.43/pcre-config --with-expat=/home/ahmcpu2176/Downloads/apache2_server/mnt/flash2/apache2_server ac_cv_func_setpgrp_void="no" ap_cv_void_ptr_lt_long=4 ac_cv_file__dev_zero="yes" ac_cv_func_setpgrp_void="yes" apr_cv_process_shared_works="yes" apr_cv_mutex_robust_shared="no" apr_cv_tcp_nodelay_with_cork="yes" ac_cv_sizeof_struct_iovec="8" apr_cv_mutex_recursive="yes" --enable-mpms-shared=all --with-mpm=event
make
-------If following error -------
/bin/bash: tools/gen_test_char: cannot execute binary file: Exec format error
Makefile:137: recipe for target 'include/private/apr_escape_test_char.h' failed
make[1]: * [include/private/apr_escape_test_char.h] Error 126
make[1]: Leaving directory '/home/ahmcpu2176/Downloads/apr-1.5.0'
/home/ahmcpu2176/Downloads/apr-1.5.0/build/apr_rules.mk:118: recipe for target 'all-recursive' failed
make: * [all-recursive] Error 1
--------Solution-------
cd srclib/apr/tools
gcc -Wall -O2 -DCROSS_COMPILE gen_test_char.c -s -o gen_test_char
cd ../../..
make
---------If following kind of error --------
/home/ahmcpu2176/Downloads/httpd-2.4.23/srclib/apr/libtool --silent --mode=link aarch64-linux-gnu-gcc -g -O2 -L/home/ahmcpu2176/Downloads/apache2_server/mnt/flash2/apache2_server/lib -o gen_test_char -L/home/ahmcpu2176/Downloads/apache2_server/mnt/flash2/apache2_server/lib gen_test_char.lo
./gen_test_char > test_char.h
/bin/bash: ./gen_test_char: cannot execute binary file: Exec format error
Makefile:36: recipe for target 'test_char.h' failed
make[2]: * [test_char.h] Error 126
make[2]: Leaving directory '/home/ahmcpu2176/Downloads/httpd-2.4.23/server'
/home/ahmcpu2176/Downloads/httpd-2.4.23/build/rules.mk:75: recipe for target 'all-recursive' failed
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory '/home/ahmcpu2176/Downloads/httpd-2.4.23/server'
/home/ahmcpu2176/Downloads/httpd-2.4.23/build/rules.mk:75: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
--------Solution-------
cd server
gcc gen_test_char.c -I./../srclib/apr/include/ -o gen_test_char
cd ..
make
make install DESTDIR=/home/ahmcpu2176/Downloads/apache2_server
cd ..
tar cvzf apache2_server.tar.gz apache2_server

Related

Errors in p4est and cmake when install dealii

Can anyone help me with this issue?
In order to use dealii, I tried to install p4est using the command
./configure && make && make install
and
cmake .. -DP4EST_DIR=/usr/local -DDEAL_II_WITH_P4EST=ON -DDEAL_II_WITH_MPI=ON -DCMAKE_INSTALL_PREFIX=/usr/local
under "build" folder, but some error occurs.
I also opened the file dealii-9.0.0/build/CMakeFiles/CMakeError.log, it says:
Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test rt_LIBRARY failed with the following output:
Change Dir: /Users/chuxiaoyun/Downloads/dealii-9.0.0/build/CMakeFiles/CMakeScratch/TryCompile-Fscvq9
Run Build Command(s):/usr/bin/make -f Makefile cmTC_bc7f9/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_bc7f9.dir/build.make CMakeFiles/cmTC_bc7f9.dir/build
Building CXX object CMakeFiles/cmTC_bc7f9.dir/src.cxx.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Drt_LIBRARY -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -mmacosx-version-min=11.6 -MD -MT CMakeFiles/cmTC_bc7f9.dir/src.cxx.o -MF CMakeFiles/cmTC_bc7f9.dir/src.cxx.o.d -o CMakeFiles/cmTC_bc7f9.dir/src.cxx.o -c /Users/chuxiaoyun/Downloads/dealii-9.0.0/build/CMakeFiles/CMakeScratch/TryCompile-Fscvq9/src.cxx
Linking CXX executable cmTC_bc7f9
/opt/homebrew/Cellar/cmake/3.25.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_bc7f9.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -mmacosx-version-min=11.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_bc7f9.dir/src.cxx.o -o cmTC_bc7f9 -lrt
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_bc7f9] Error 1
make: *** [cmTC_bc7f9/fast] Error 2
CMake Error at cmake/macros/macro_configure_feature.cmake:112 (MESSAGE):
Could not find the p4est library!
Insufficient p4est installation found!
p4est has to be configured with MPI enabled.
Please ensure that a suitable p4est library is installed on your computer.
If the library is not at a default location, either provide some hints for
autodetection,
$ P4EST_DIR="..." cmake <...>
$ cmake -DP4EST_DIR="..." <...>
or set the relevant variables by hand in ccmake.
Call Stack (most recent call first):
cmake/macros/macro_configure_feature.cmake:269 (FEATURE_ERROR_MESSAGE)
cmake/configure/configure_p4est.cmake:78 (CONFIGURE_FEATURE)
cmake/macros/macro_verbose_include.cmake:19 (INCLUDE)
CMakeLists.txt:124 (VERBOSE_INCLUDE)
I guess I haven't installed p4est correctly, so I configure it again.
# p4est-2.8 ./configure --enable-mpi.
( Here shows we are using MPI. I also tried p4est-2.8 ./configure --enable-mpi --prefix=/usr/local)
Then I tried to build and install p4est, but it gives me an error during installation:
# make
# ➜ p4est-2.8 make install
/Applications/Xcode.app/Contents/Developer/usr/bin/make install-recursive
Making install in sc
/Applications/Xcode.app/Contents/Developer/usr/bin/make install-am
build-aux/install-sh -c -d '/Users/xiaoyun/Downloads/p4est-2.8/local/lib'
/bin/sh ./libtool --mode=install /usr/bin/install -c src/libsc.la '/Users/xiaoyun/Downloads/p4est-2.8/local/lib'
libtool: install: /usr/bin/install -c src/.libs/libsc.0.dylib /Users/xiaoyun/Downloads/p4est-2.8/local/lib/libsc.0.dylib
install: /Users/xiaoyun/Downloads/p4est-2.8/local/lib/libsc.0.dylib: Permission denied
make[4]: *** [install-libLTLIBRARIES] Error 71
make[3]: *** [install-am] Error 2
make[2]: *** [install] Error 2
make[1]: *** [install-recursive] Error 1
I have no idea why the permission is denied, I also tried sudo make install:
objc[71909]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x20230f7e8) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10c9082c8). One of the two will be used. Which one is undefined.
objc[71909]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x20230f838) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10c908318). One of the two will be used. Which one is undefined.
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
make: getcwd: Operation not permitted
make: Nothing to be done for `install'.

Why is my MakeFile path setup getting a "No such file or directory" error?

I am trying to run a makefile. I think the makefile is trying to access this path:
/home/s/miniconda3/lib/python3.7/site-packages/tensorflow/include/unsupported/Eigen
But when I run it, I get a No such file or directory error:
(base) s#s-VirtualBox:~/Downloads/3d-psrnet-master$ make
make: Circular utils/tf_ops/cd/tf_nndistance_g.cu <- utils/tf_ops/cd/tf_nndistance_g.cu.o dependency dropped.
/usr/local/cuda-10.1/bin/nvcc -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -c -o utils/tf_ops/cd/tf_nndistance_g.cu.o utils/tf_ops/cd/tf_nndistance_g.cu -I /home/s/miniconda3/lib/python3.7/site-packages -DGOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -O2
utils/tf_ops/cd/tf_nndistance_g.cu:3:10: fatal error: include/unsupported/Eigen: No such file or directory
#include "include/unsupported/Eigen"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [makefile:12: utils/tf_ops/cd/tf_nndistance_g.cu.o] Error 1
I have it set like this at the top of makefile: tensorflow = /home/s/miniconda3/lib/python3.7/site-packages (which is the path that shows up if I type into Terminal pip show tensorflow)
And then in tf_nndistance_g.cu I have:
#include "include/unsupported/Eigen/"
What might be the reason that this makefile isn't working? I'm using Python 3.7 on a Virtual Machine (ubuntu Virtualbox). Thanks.

can't MAKE tensorflow Raspberry pi examples

I installed tensorflow on the Raspberry Pi 3, running Jessie and did that in two ways, via the .whl file / pip install for Python 2.7.:
https://github.com/samjabrahams/tensorflow-on-raspberry-pi
as well as a full compile via:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/makefile
Both installs (I did them on different OS images) where successfull and went through without error.
Next, I wanted to compile the official Raspberry Pi examples from tensorflow's git repository:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/pi_examples
However, none of the examples does compile (neither the camera example nor the image recognition), both give the same error and Google doesn't tell me anything:
make -f tensorflow/contrib/pi_examples/camera/Makefile gcc --std=c++11
-O0 -I/usr/local/include -I. -I/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/../../makefile/downloads
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/../../makefile/downloads/eigen/
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/../../makefile/gen/proto/
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/../../makefile/gen/proto_text/
-c tensorflow/contrib/pi_examples/camera/camera.cc -o /home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/gen/obj/tensorflow/contrib/pi_examples/camera/camera.o
In file included from ./tensorflow/core/platform/mutex.h:31:0,
from ./tensorflow/core/framework/variant.h:31,
from ./tensorflow/core/framework/allocator.h:26,
from ./tensorflow/core/framework/tensor.h:20,
from tensorflow/contrib/pi_examples/camera/camera.cc:33:
./tensorflow/core/platform/default/mutex.h:25:22: fatal error:
nsync_cv.h: No such file or directory #include "nsync_cv.h"
^ compilation terminated. tensorflow/contrib/pi_examples/camera/Makefile:80: recipe for target
'/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/gen/obj/tensorflow/contrib/pi_examples/camera/camera.o'
failed make: ***
[/home/pi/tensorflow/tensorflow/contrib/pi_examples/camera/gen/obj/tensorflow/contrib/pi_examples/camera/camera.o]
Error 1
as well as:
make -f tensorflow/contrib/pi_examples/label_image/Makefile gcc
--std=c++11 -O0 -I/usr/local/include -I. -I/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/../../makefile/downloads
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/../../makefile/downloads/eigen/
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/../../makefile/gen/proto/
-I/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/../../makefile/gen/proto_text/
-c tensorflow/contrib/pi_examples/label_image/label_image.cc -o /home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/gen/obj/tensorflow/contrib/pi_examples/label_image/label_image.o
In file included from ./tensorflow/core/platform/mutex.h:31:0,
from ./tensorflow/core/framework/variant.h:31,
from ./tensorflow/core/framework/allocator.h:26,
from ./tensorflow/core/framework/tensor.h:20,
from tensorflow/contrib/pi_examples/label_image/label_image.cc:33:
./tensorflow/core/platform/default/mutex.h:25:22: fatal error:
nsync_cv.h: No such file or directory #include "nsync_cv.h"
^ compilation terminated. tensorflow/contrib/pi_examples/label_image/Makefile:79: recipe for
target
'/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/gen/obj/tensorflow/contrib/pi_examples/label_image/label_image.o'
failed make: ***
[/home/pi/tensorflow/tensorflow/contrib/pi_examples/label_image/gen/obj/tensorflow/contrib/pi_examples/label_image/label_image.o]
Error 1
How can I locate / add / compile "nsync_cv.h"?
And btw:
export HOST_NSYNC_LIB=`tensorflow/contrib/makefile/compile_nsync.sh`
gives me:
g++ -M -std=c++11 -DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11
-I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread -I../../public -I../../internal ../../internal/*.c ../../testing/*.c ../../platform/c++11/src/nsync_semaphore_mutex.cc
../../platform/c++11/src/per_thread_waiter.cc
../../platform/c++11/src/yield.cc
../../platform/c++11/src/time_rep_timespec.cc
../../platform/c++11/src/nsync_panic.cc \
../../platform/c++11/src/start_thread.cc > dependfile make: 'nsync.a' is up to date.
I once compiled tensorflow with the makefile on a nvidia Jetson TX1 and I could compile and run the examples by adding some lines to the Makefiles of the examples:
after line 18:
NSYNCLIBDIR := $(TFMAKEFILE_DIR)/downloads/nsync/builds/default.linux.c++11 !!!change folder default.linux.c++11 to where your libnsync.a is!!!
NSYNCLIBS := $(NSYNCLIBDIR)/libnsync.a
after line 26:
NSYNC := $(TFMAKEFILE_DIR)/downloads/nsync/public/
after line 36:
-L$(NSYNCLIBDIR) \
after line 43:
-I$(NSYNC) \
after line 51:
-lnsync \
change line 72 to:
$(EXECUTABLE_NAME): $(EXECUTABLE_OBJS) $(TFLIBS) $(NSYNCLIBS)
Hope it works with that changes, good luck :)

Using WiringPi C library through SSH on Netbeans

How can I use WiringPi library through SSH on Netbeans? When I run a simple HelloWorld program, it works.
This is the output message:
Copying project files to /root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64 at root#RASPBERRYPI
Building project files list...
Checking directory structure...
Checking previously uploaded files...
Checking links...
Uploading changed files:
Zipping 10 changed files...
Uploading zip to root#RASPBERRYPI...
Unzipping changed files...
Checking exec permissions...
Uploading changed files finished successfully.
cd '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
/usr/bin/make -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux/blinkingled
make[2]: Entering directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
mkdir -p build/Debug/GNU-Linux
rm -f "build/Debug/GNU-Linux/main.o.d"
gcc -c -g -std=c11 -MMD -MP -MF "build/Debug/GNU-Linux/main.o.d" -o build/Debug/GNU-Linux/main.o main.c
mkdir -p dist/Debug/GNU-Linux
gcc -o dist/Debug/GNU-Linux/blinkingled build/Debug/GNU-Linux/main.o
build/Debug/GNU-Linux/main.o: In function `main':
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:24: undefined reference to `wiringPiSetup'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:29: undefined reference to `pinMode'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:32: undefined reference to `digitalWrite'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:34: undefined reference to `delay'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:35: undefined reference to `digitalWrite'
/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED/main.c:37: undefined reference to `delay'
collect2: error: ld returned 1 exit status
nbproject/Makefile-Debug.mk:62: recipe for target 'dist/Debug/GNU-Linux/blinkingled' failed
make[2]: *** [dist/Debug/GNU-Linux/blinkingled] Error 1
make[2]: Leaving directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/root/.netbeans/remote/RASPBERRYPI/win-7pjgqkgjsj4-Windows-x86_64/C/Users/Public/Remote Projects/BlinkingLED'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
This is a quite old post, but since I've had the same problem and I've resolved it I'm now writing down the solution, so if someone needs it, it's ready ;)
The only thing to do is to add some parameters to the compilation command, in particular the path to binaries and includes plus the -lwiringpi option.
To do that in NetBeans, rightclick on the project, then properties. From there, Build->C Compiler.
Now, find the voice Additional Options, open it and copy paste the following:
-I/usr/local/include -L/usr/local/lib -lwiringPi
(that are the paths to the standard installation of wiringPi, if you have changed the location of the library change the paths accordingly)
Now it should work, at least it worked for me.
Hope it helped someone,
Bye
EDIT:
I forgot to add that you must ssh as root user, otherwise wiringPi doesn't work.
For that you must do:
passwd root
to set root password
sudo nano /etc/ssh/sshd_config
And change PermitRootLogin to yes
reboot

unable to compile pacman(ArchLinux package manager) in ubuntu

I have tried to do the Offline Installation as described in the ArchLinux wiki, but it did not worked out as i have mentioned in the thread https://stackoverflow.com/posts/comments/12588344. Hence i have planned to compile the pacman in a machine which has internet connection and then download the packages using the compiled pacman binary and then transfer it to offline ArchLinux Machine.
While i tried to compile the pacman in Ubuntu-11.10 machine i got the following errors
$ make # after ./autogen.sh && ./configure
make all-recursive
make[1]: Entering directory `/home/talespin/archlinux/pacman'
Making all in lib/libalpm
make[2]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm'
Making all in po
make[3]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm/po'
test ! -f ./libalpm.pot || \
test -z "ca.gmo cs.gmo da.gmo de.gmo el.gmo en_GB.gmo es.gmo fi.gmo fr.gmo hu.gmo it.gmo kk.gmo lt.gmo nb.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sr.gmo sr#latin.gmo sv.gmo tr.gmo uk.gmo zh_CN.gmo zh_TW.gmo" || make ca.gmo cs.gmo da.gmo de.gmo el.gmo en_GB.gmo es.gmo fi.gmo fr.gmo hu.gmo it.gmo kk.gmo lt.gmo nb.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sr.gmo sr#latin.gmo sv.gmo tr.gmo uk.gmo zh_CN.gmo zh_TW.gmo
make[4]: Entering directory `/home/talespin/archlinux/pacman/lib/libalpm/po'
: --update --lang=ca ca.po libalpm.pot
rm -f ca.gmo && : -c --statistics --verbose -o ca.gmo ca.po
mv: cannot stat `t-ca.gmo': No such file or directory
make[4]: *** [ca.gmo] Error 1
make[4]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm/po'
make[3]: *** [stamp-po] Error 2
make[3]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm/po'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/talespin/archlinux/pacman/lib/libalpm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/talespin/archlinux/pacman'
make: *** [all] Error 2
I have cloned the source from git://projects.archlinux.org/pacman.git and tried compiling with the commit e6f72c61a098b52ea29e54b8eb4739a2ff81e6b0 and its parents(until commit ae25167bcd592186749b79ea31b10fb78ed9fb2d) with no success.
Solved as explained in the mailing list http://mailman.archlinux.org/pipermail/pacman-dev/2012-March/015341.html
Used the git commit e6f72c61a098b52ea29e54b8eb4739a2ff81e6b0in
repo git://projects.archlinux.org/pacman.git
1) $ git clean -xfd; ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--enable-git-version --enable-debug --without-gpgme
2) cd lib/libalpm
3) In the Makefile replace line
LIBS = -lssl -larchive -lm
with
LIBS = -lssl -larchive -lm -lcrypto
4) cd ../../ && make