Fatel Error Android NDK adding Eigen/Dense - android-studio

I'm using this library for attendance monitoring app. https://github.com/Lauszus/FaceRecognitionApp
I extracted SDKs to OpenCV-android-sdk & Eigen3
I'm using following commands to set environment variables:
setx OPENCV_ANDROID_SDK C:/Users/...(my path)../OpenCV-android-sdk/sdk
setx EIGEN3_DIR /path/to/eigen3 C:/Users/...(my path).../Eigen3
echo %C:/Users/...(my path)../OpenCV-android-sdk/sdk% %C:/Users/...(my path).../eigen-eigen-67e894c6cd8f%
My Android.mk fie:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_INSTALL_MODULES := on
include $(OPENCV_ANDROID_SDK)C:/Users/Amey/AndroidStudioProjects/DevAttendance/FaceRecognitionApp/app/src/main/OpenCV-android-sdk/sdk/native/jni/OpenCV.mk
LOCAL_MODULE := face-lib
LOCAL_SRC_FILES += $(LOCAL_PATH)/face-lib.cpp $(LOCAL_PATH)/FaceRecognitionLib/Facebase.cpp
LOCAL_SRC_FILES += $(LOCAL_PATH)/FaceRecognitionLib/Eigenfaces.cpp $(LOCAL_PATH)/FaceRecognitionLib/Fisherfaces.cpp
LOCAL_SRC_FILES += $(LOCAL_PATH)/FaceRecognitionLib/PCA.cpp $(LOCAL_PATH)/FaceRecognitionLib/LDA.cpp
LOCAL_C_INCLUDES += $(EIGEN3_DIR) $(LOCAL_PATH)/FaceRecognitionLib/RedSVD/include
LOCAL_LDLIBS += -llog -ldl
LOCAL_CPPFLAGS += -std=gnu++11 -frtti -fexceptions
include $(BUILD_SHARED_LIBRARY)
I'm getting following error:
Information:Gradle tasks [:app:assembleDebug]
C:\Users\Amey\AndroidStudioProjects\DevAttendance\FaceRecognitionApp\app\src\main\cpp\face-lib.cpp
Error:(20, 10) fatal error: 'Eigen/Dense' file not found
Information:BUILD FAILED
Information:Total time: 2.354 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

Related

Building Mplayer from sources in Linux

I've encountered a problem trying to build Mplayer from sources (svn version). I run 'configure' script with no parameters. It indicates no problems. FFmpeg compiles fine, but the last stage, that is building mplayer, fails:
ffmpeg/libavcodec/h263dec.o: In function `ff_h263_decode_frame':
h263dec.c:(.text+0xddb): undefined reference to `ff_h263_find_frame_end'
h263dec.c:(.text+0xfa0): undefined reference to `ff_mpeg4_find_frame_end'
ffmpeg/libavcodec/mlpdec.o: In function `read_access_unit':
mlpdec.c:(.text+0x128a): undefined reference to `ff_mlp_read_major_sync'
ffmpeg/libavcodec/ac3dec_fixed.o: In function `ac3_decode_frame':
ac3dec_fixed.c:(.text+0x73a3): undefined reference to `ff_ac3_parse_header'
ac3dec_fixed.c:(.text+0x7d4f): undefined reference to `ff_ac3_parse_header'
ffmpeg/libavcodec/ac3dec_float.o: In function `ac3_decode_frame':
ac3dec_float.c:(.text+0x687f): undefined reference to `ff_ac3_parse_header'
ac3dec_float.c:(.text+0x727b): undefined reference to `ff_ac3_parse_header'
ffmpeg/libavcodec/eac3_core_bsf.o: In function `eac3_core_filter':
eac3_core_bsf.c:(.text+0x7d): undefined reference to `ff_ac3_parse_header'
ffmpeg/libavcodec/eac3_core_bsf.o:eac3_core_bsf.c:(.text+0x174): more undefined references to `ff_ac3_parse_header' follow
collect2: error: ld returned 1 exit status
Makefile:747: recipe for target 'mplayer' failed
make: *** [mplayer] Error 1
The above resulted from:
cc -o mplayer command.o m_property.o mixer.o mp_fifo.o mplayer.o parser-mpcmd.o pnm_loader.o input/input.o libao2/ao_mpegpes.o libao2/ao_null.o libao2/ao_pcm.o libao2/audio_out.o libvo/aspect.o libvo/geometry.o libvo/video_out.o libvo/vo_mpegpes.o libvo/vo_null.o sub/spuenc.o libvo/vo_aa.o libao2/ao_alsa.o input/appleir.o libvo/vo_caca.o libvo/vo_dga.o libvo/vo_directfb2.o libvo/vo_dfbmga.o libvo/vo_fbdev.o libvo/vo_fbdev2.o libvo/vo_png.o libvo/vo_gif89a.o libvo/gl_common.o libvo/vo_gl.o libvo/csputils.o libvo/sdl_common.o libvo/x11_common.o libvo/vo_gl_tiled.o libao2/ao_jack.o libvo/vo_jpeg.o input/lirc.o libvo/vo_matrixview.o libvo/matrixview.o libvo/vo_md5sum.o libvo/vo_mng.o libao2/ao_nas.o udp_sync.o libao2/ao_openal.o libao2/ao_oss.o libvo/vo_pnm.o libao2/ao_pulse.o libao2/ao_sdl.o libvo/vo_sdl.o libvo/vo_tga.o libvo/vo_v4l2.o libao2/ao_v4l2.o libvo/vo_vdpau.o libvo/vo_cvidix.o libvo/vosub_vidix.o vidix/vidix.o vidix/drivers.o vidix/dha.o vidix/mtrr.o vidix/pci.o vidix/pci_names.o vidix/pci_dev_ids.o vidix/cyberblade_vid.o vidix/mach64_vid.o vidix/mga_vid.o vidix/mga_crtc2_vid.o vidix/nvidia_vid.o vidix/pm2_vid.o vidix/pm3_vid.o vidix/radeon_vid.o vidix/rage128_vid.o vidix/s3_vid.o vidix/sis_vid.o vidix/sis_bridge.o vidix/unichrome_vid.o libvo/vo_x11.o libvo/vo_xover.o libvo/vo_xv.o libvo/vo_xvidix.o libvo/vo_yuv4mpeg.o asxparser.o bstr.o codec-cfg.o cpudetect.o edl.o fmt-conversion.o m_config.o m_option.o m_struct.o mp_msg.o mp_strings.o mpcommon.o parser-cfg.o path.o playtree.o playtreeparser.o subopt-helper.o libaf/af.o libaf/af_center.o libaf/af_channels.o libaf/af_comp.o libaf/af_delay.o libaf/af_dummy.o libaf/af_equalizer.o libaf/af_extrastereo.o libaf/af_format.o libaf/af_gate.o libaf/af_hrtf.o libaf/af_karaoke.o libaf/af_pan.o libaf/af_resample.o libaf/af_scaletempo.o libaf/af_sinesuppress.o libaf/af_stats.o libaf/af_sub.o libaf/af_surround.o libaf/af_sweep.o libaf/af_tools.o libaf/af_volnorm.o libaf/af_volume.o libaf/filter.o libaf/format.o libaf/reorder_ch.o libaf/window.o libmpcodecs/ad.o libmpcodecs/ad_alaw.o libmpcodecs/ad_dvdpcm.o libmpcodecs/ad_hwac3.o libmpcodecs/ad_hwmpa.o libmpcodecs/ad_pcm.o libmpcodecs/dec_audio.o libmpcodecs/dec_teletext.o libmpcodecs/dec_video.o libmpcodecs/img_format.o libmpcodecs/mp_image.o libmpcodecs/pullup.o libmpcodecs/vd.o libmpcodecs/vd_hmblck.o libmpcodecs/vd_lzo.o libmpcodecs/vd_mpegpes.o libmpcodecs/vd_mtga.o libmpcodecs/vd_null.o libmpcodecs/vd_raw.o libmpcodecs/vd_sgi.o libmpcodecs/vd_black.o libmpcodecs/vf.o libmpcodecs/vf_1bpp.o libmpcodecs/vf_2xsai.o libmpcodecs/vf_blackframe.o libmpcodecs/vf_boxblur.o libmpcodecs/vf_crop.o libmpcodecs/vf_cropdetect.o libmpcodecs/vf_decimate.o libmpcodecs/vf_delogo.o libmpcodecs/vf_denoise3d.o libmpcodecs/vf_detc.o libmpcodecs/vf_dint.o libmpcodecs/vf_divtc.o libmpcodecs/vf_down3dright.o libmpcodecs/vf_dsize.o libmpcodecs/vf_dvbscale.o libmpcodecs/vf_eq.o libmpcodecs/vf_eq2.o libmpcodecs/vf_expand.o libmpcodecs/vf_field.o libmpcodecs/vf_fil.o libmpcodecs/vf_filmdint.o libmpcodecs/vf_fixpts.o libmpcodecs/vf_flip.o libmpcodecs/vf_format.o libmpcodecs/vf_framestep.o libmpcodecs/vf_gradfun.o libmpcodecs/vf_halfpack.o libmpcodecs/vf_harddup.o libmpcodecs/vf_hqdn3d.o libmpcodecs/vf_hue.o libmpcodecs/vf_il.o libmpcodecs/vf_ilpack.o libmpcodecs/vf_ivtc.o libmpcodecs/vf_kerndeint.o libmpcodecs/vf_mirror.o libmpcodecs/vf_noformat.o libmpcodecs/vf_noise.o libmpcodecs/vf_ow.o libmpcodecs/vf_palette.o libmpcodecs/vf_perspective.o libmpcodecs/vf_phase.o libmpcodecs/vf_pp7.o libmpcodecs/vf_pullup.o libmpcodecs/vf_rectangle.o libmpcodecs/vf_remove_logo.o libmpcodecs/vf_rgbtest.o libmpcodecs/vf_rotate.o libmpcodecs/vf_sab.o libmpcodecs/vf_scale.o libmpcodecs/vf_smartblur.o libmpcodecs/vf_softpulldown.o libmpcodecs/vf_stereo3d.o libmpcodecs/vf_softskip.o libmpcodecs/vf_swapuv.o libmpcodecs/vf_telecine.o libmpcodecs/vf_test.o libmpcodecs/vf_tfields.o libmpcodecs/vf_tile.o libmpcodecs/vf_tinterlace.o libmpcodecs/vf_unsharp.o libmpcodecs/vf_vo.o libmpcodecs/vf_yadif.o libmpcodecs/vf_yuvcsp.o libmpcodecs/vf_yvu9.o libmpdemux/aac_hdr.o libmpdemux/asfheader.o libmpdemux/aviheader.o libmpdemux/aviprint.o libmpdemux/demuxer.o libmpdemux/demux_aac.o libmpdemux/demux_asf.o libmpdemux/demux_audio.o libmpdemux/demux_avi.o libmpdemux/demux_demuxers.o libmpdemux/demux_film.o libmpdemux/demux_fli.o libmpdemux/demux_lmlm4.o libmpdemux/demux_mf.o libmpdemux/demux_mkv.o libmpdemux/demux_mov.o libmpdemux/demux_mpg.o libmpdemux/demux_nsv.o libmpdemux/demux_pva.o libmpdemux/demux_rawaudio.o libmpdemux/demux_rawvideo.o libmpdemux/demux_realaud.o libmpdemux/demux_real.o libmpdemux/demux_roq.o libmpdemux/demux_smjpeg.o libmpdemux/demux_ts.o libmpdemux/demux_ty.o libmpdemux/demux_ty_osd.o libmpdemux/demux_viv.o libmpdemux/demux_vqf.o libmpdemux/demux_y4m.o libmpdemux/ebml.o libmpdemux/extension.o libmpdemux/mf.o libmpdemux/mp3_hdr.o libmpdemux/mp_taglists.o libmpdemux/mpeg_hdr.o libmpdemux/mpeg_packetizer.o libmpdemux/parse_es.o libmpdemux/parse_mp4.o libmpdemux/video.o libmpdemux/yuv4mpeg.o libmpdemux/yuv4mpeg_ratio.o osdep/getch2.o osdep/timer-linux.o stream/open.o stream/stream.o stream/stream_bd.o stream/stream_cue.o stream/stream_file.o stream/stream_mf.o stream/stream_null.o stream/url.o sub/eosd.o sub/find_sub.o sub/osd.o sub/spudec.o sub/sub.o sub/sub_cc.o sub/subreader.o sub/vobsub.o stream/ai_alsa.o stream/ai_oss.o sub/font_load.o stream/stream_cdda.o stream/cdinfo.o stream/stream_cddb.o stream/dvb_tune.o stream/stream_dvb.o stream/stream_dvdnav.o stream/stream_dvd.o stream/stream_dvd_common.o libmpcodecs/ad_faad.o libvo/aclib.o av_helpers.o av_opts.o libaf/af_lavcac3enc.o libaf/af_lavcresample.o libmpcodecs/ad_ffmpeg.o libmpcodecs/ad_spdif.o libmpcodecs/vd_ffmpeg.o libmpcodecs/vf_geq.o libmpcodecs/vf_lavc.o libmpcodecs/vf_lavcdeint.o libmpcodecs/vf_screenshot.o libmpdemux/demux_lavf.o stream/stream_ffmpeg.o sub/av_sub.o libmpcodecs/vf_fspp.o libmpcodecs/vf_qp.o libmpcodecs/vf_spp.o libmpcodecs/vf_uspp.o sub/font_load_ft.o stream/stream_ftp.o libmpdemux/demux_gif.o libmpcodecs/vf_bmovl.o libaf/af_export.o osdep/mmap_anon.o libmpcodecs/vd_ijpg.o libaf/af_ladspa.o libmpcodecs/ad_liba52.o libmpcodecs/vf_ass.o sub/ass_mp.o sub/subassconvert.o stream/stream_bluray.o libaf/af_bs2b.o libmpcodecs/ad_libdca.o libmpcodecs/ad_libdv.o libmpcodecs/vd_libdv.o libmpdemux/demux_rawdv.o libmpcodecs/ad_libmad.o libmpcodecs/vd_libmpeg2.o stream/stream_smb.o libmpcodecs/vd_theora.o libmpdemux/demux_mng.o libmpcodecs/ad_mpg123.o stream/stream_rtsp.o stream/freesdp/common.o stream/freesdp/errorlist.o stream/freesdp/parser.o stream/librtsp/rtsp.o stream/librtsp/rtsp_rtp.o stream/librtsp/rtsp_session.o stream/stream_netstream.o stream/asf_mmst_streaming.o stream/asf_streaming.o stream/cookies.o stream/http.o stream/network.o stream/pnm.o stream/rtp.o stream/udp.o stream/tcp.o stream/stream_rtp.o stream/stream_udp.o stream/realrtsp/asmrp.o stream/realrtsp/real.o stream/realrtsp/rmff.o stream/realrtsp/sdpplin.o stream/realrtsp/xbuffer.o libmpcodecs/vd_mpng.o libmpcodecs/vf_pp.o stream/stream_pvr.o libmpcodecs/ad_realaud.o libmpcodecs/vd_realvid.o libmpcodecs/ad_speex.o stream/cache2.o stream/frequencies.o stream/stream_tv.o stream/tv.o stream/tvi_dummy.o stream/tvi_v4l2.o stream/audio_in.o sub/unrar_exec.o stream/stream_vcd.o libmpcodecs/ad_libvorbis.o libmpdemux/demux_ogg.o stream/stream_vstream.o libmpcodecs/vd_xanim.o libmpcodecs/vd_xvid4.o osdep/shmem.o ffmpeg/libpostproc/libpostproc.a ffmpeg/libavfilter/libavfilter.a ffmpeg/libavformat/libavformat.a ffmpeg/libavcodec/libavcodec.a ffmpeg/libswscale/libswscale.a ffmpeg/libswresample/libswresample.a ffmpeg/libavutil/libavutil.a -Wl,--version-script,binary.ver -Wl,-z,noexecstack -ffast-math -fpie -pie -lncurses -lrt -lgnutls -lsmbclient -lpng -lz -lmng -lz -ljpeg -lgif -lasound -ldl -lpthread -lbluray -ldvdread -lcdio_cdda -lcdio -lcdio_paranoia -lfreetype -lfontconfig -lfribidi -lass -lenca -lz -llzo2 -lmad -logg -lvorbisidec -lspeex -lgsm -ltheoradec -logg -lmpg123 -la52 -lmpeg2 -ldca -lfaad -lopus -lbs2b -lrtmp -ldv -lcrystalhd -lxvidcore -lvstream-client -lpthread -ldl -rdynamic -L/usr/lib/x86_64-linux-gnu -ldvdnav -lpthread -lm -ldirectfb -lXext -lX11 -lpthread -lXss -lXv -lvdpau -lXinerama -lXxf86vm -lXxf86dga -laa -lcaca -lSDL -lGL -ldl -laudio -lXt -lpulse -ljack -lopenal -lx264 -lpthread -lmp3lame -llirc_client
Any hints or ideas? I will appreciate any help.
ac3_parser.c, h263_parser.c in ffmpeg/libavcodec failed to compile, perhaps others. Try updating the svn version. If that doesn't work try workaround:
cd ffmpeg/libavcodec
cc -I../.. -I.. -c -o ac3_parser.o ac3_parser.c
ar rT libavcodec.a ac3_parser.o
repeat as necessary for what is missing...
cd -
make all

using scons for literate programming

Using noweb, I would either like to generate a document file (or a source file) from a noweb input file **.nw
From hand I would do something like that:
notangle my_program.nw > my_program.cpp
g++ -c my_program.o my_program.cpp
ln -o myapp ... my_program.o ...
Now I like to ask whether I can use scons to automate this.
Imagine, my project directory is on $MYPROJECT. THere we have "$MYPROJECT/SConstruct".
Now I defined a scons tool "tangle.py" (simplified from "noweb.py).
Here we have "$MYPROJECT/site_scons/site_tools/tangle.py"
import SCons.Builder
def cpp_emit (target,source, env):
# I dont know what to do here ... please help
return (target,source)
# Tangle to .cpp
__noweb_tangle_builder = SCons.Builder.Builder(
action='/usr/bin/notangle $SOURCES >$TARGET',
suffix='.cpp',
src_suffix='.nw',
emitter=cpp_emit)
# -----------------------
def generate(env):
env['BUILDERS']['tangle']= __noweb_tangle_builder
def exists(env):
return 1
This tool generates a cpp-file from a nw-file.
But if I do something like
def cpp_emit (target,source, env):
new_source=target[0].name
new_target=new_source.rstrip(".cpp")+".o"
target.append(new_target)
source.append(new_source)
return (target, source)
I get into a dependency circle. SCons will find and abort with an error message.
Doing ...
def cpp_emit (target,source, env):
new_source=target[0].name
# someprogram.cpp -> someprogram.o
new_target=new_source.rstrip(".cpp")+".o"
# lets avoid dependency cycle
t = []
t.append(new_target)
source.append(new_source)
# oops, we dropped target test.cpp. It wont be generated.
return (t, source)
... the tool would stop generating a cpp file from a nw file. (Cpp target dropped)
Do you know a working way to do use scons for literate programming?
thank you for reading.
Leonard
Here is the tool that I created. Note the use of env['BUILDERS']['Object'].src_builder to allow env.Program() to accept noweb files.
# site_cons/site_tools/tangle.py
import SCons.Builder
__all__=['generate', 'exists']
tangle_builder = SCons.Builder.Builder(
action='$NOTANGLE $SOURCES > $TARGET',
suffix = '.cpp',
src_suffix = '.nw')
def generate(env):
env['NOTANGLE'] = exists(env)
env['BUILDERS']['Tangle'] = tangle_builder
if 'Object' in env['BUILDERS']:
env['BUILDERS']['Object'].src_builder.append('Tangle')
def exists(env):
if 'NOTANGLE' in env:
return env['NOTANGLE']
return env.WhereIs('notangle')
And its use:
# SConstruct
env = Environment(tools=['default', 'tangle'])
env.Program('my_program.nw')
Here is the output of the above SConstruct:
$ scons -Q
/usr/bin/notangle my_program.nw > my_program.cpp
g++ -o my_program.o -c my_program.cpp
g++ -o my_program my_program.o
$ scons -c
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Cleaning targets ...
Removed my_program.cpp
Removed my_program.o
Removed my_program
scons: done cleaning targets.
Seems like you're trying to add the object file without actually compiling the cpp file.
I made a small example that should help clear up the situation. Basically, since you configured the suffix, and src_suffix in the call to Builder, the sources and targets are correctly setup by SCons, and you dont need the emitter.
def cpp_emit (target,source, env):
for t in target:
print 'Emitter target: %s' % (t)
for s in source:
print 'Emitter source: %s' % (s.name)
return (target,source)
# Tangle to .cpp
builder = Builder(
action='/home/notroot/projects/sandbox/Emitter/builder.sh $SOURCES $TARGET',
suffix='.cc',
src_suffix='.nw',
emitter=cpp_emit)
env = Environment()
env['BUILDERS']['tangle'] = builder
tangleTarget = env.tangle(target='main.cc', source='main.nw')
env.Object(source=tangleTarget)
And here is the output:
$ scons
scons: Reading SConscript files ...
Emitter target: main.cc
Emitter source: main.nw
scons: done reading SConscript files.
scons: Building targets ...
/home/notroot/projects/sandbox/Emitter/builder.sh main.nw main.cc
g++ -o main.o -c main.cc
scons: done building targets.
$ scons -c
scons: Reading SConscript files ...
Emitter target: main.cc
Emitter source: main.nw
scons: done reading SConscript files.
scons: Cleaning targets ...
Removed main.cc
Removed main.o
scons: done cleaning targets.
I did the following to get the Builder to generate the cc file and compile it, but it doesnt clean the object file.
import os
def cpp_emit(target,source, env):
for s in source:
print 'Emitter source: %s' % (s.name)
for t in target:
print 'Emitter target: %s' % (t)
return (target,source)
def build_function(target, source, env):
# Code to build "target" from "source"
for t in target:
print 'Builder target: %s' % (t.name)
for s in source:
print 'Builder source: %s' % (s.name)
buildStr='/home/notroot/projects/sandbox/Emitter/builder.sh %s %s' % (source[0].name, target[0].name)
os.system(buildStr)
trgt = env.Object(source=target[0])
# return 0 or None upon success
return None
# Tangle to .cc and .o
builder = Builder(
action=build_function,
suffix='.cc',
src_suffix='.nw',
emitter=cpp_emit)
env = Environment()
env['BUILDERS']['tangle'] = builder
tangleTarget = env.tangle(target='main.cc', source='main.nw')
Here is the output:
$ scons
scons: Reading SConscript files ...
Emitter source: main.nw
Emitter target: main.cc
scons: done reading SConscript files.
scons: Building targets ...
build_function(["main.cc"], ["main.nw"])
Builder target: main.cc
Builder source: main.nw
scons: done building targets.
$ scons -c
scons: Reading SConscript files ...
Emitter source: main.nw
Emitter target: main.cc
scons: done reading SConscript files.
scons: Cleaning targets ...
Removed main.cc
scons: done cleaning targets.
In this second example, if you add the object file as a target, you will get the following error (rightly so)
scons: *** [main.cc] Multiple ways to build the same target were specified for: main.o (from ['main.nw'] and from ['main.cc'])

Android NDK: Problems including headers

When I try to compile my app I see...
/bin/sh: openssl/sha.h: No such file or directory
But in my Android.mk I have...
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := iconv-prebuilt
LOCAL_SRC_FILES := extlib/$(TARGET_ARCH_ABI)/libiconv.so
LOCAL_EXPORT_C_INCLUDES := extlib/include
include $(PREBUILT_SHARED_LIBRARY)
LOCAL_MODULE := git
LOCAL_C_INCLUDES := $(LOCAL_PATH)/src $(LOCAL_PATH)/include
LOCAL_CFLAGS := -DNO_GETTEXT -DSHA1_HEADER=<openssl/sha.h>
LOCAL_SRC_FILES := \
$(subst $(LOCAL_PATH)/,, \
$(wildcard $(LOCAL_PATH)/src/*.c))
LOCAL_LDLIBS := -lm -llog -ldl
LOCAL_SHARED_LIBRARIES := iconv-prebuilt
include $(BUILD_SHARED_LIBRARY)
And the ls of the extlib/include/openssl directory is...
aes.h conf.h e_os2.h krb5_asn.h opensslconf.h rc2.h ssl3.h x509_vfy.h
asn1.h conf_api.h ebcdic.h kssl.h opensslv.h rc4.h stack.h x509v3.h
asn1_mac.h crypto.h ec.h lhash.h ossl_typ.h ripemd.h symhacks.h
asn1t.h des.h ecdh.h md4.h pem.h rsa.h tls1.h
bio.h des_old.h ecdsa.h md5.h pem2.h safestack.h ts.h
blowfish.h dh.h engine.h modes.h pkcs12.h sha.h txt_db.h
bn.h dsa.h err.h obj_mac.h pkcs7.h ssl.h ui.h
buffer.h dso.h evp.h objects.h pqueue.h ssl2.h ui_compat.h
comp.h dtls1.h hmac.h ocsp.h rand.h ssl23.h x509.h
So as you can see the header file is there and should be fine to include. Any ideas what I am doing wrong here? I am guessing it is an issue in my Android.mk

Android NDK: Linking "error: undefined reference to" GLES functions

So I have the following on my Android.mk....
...
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include /Users/myname/Development/Android/android-ndk-r8c/platforms/android-14/arch-arm/usr/include
...
LOCAL_LDLIBS := -ldl -lGLESv1_CM -llog
However, when I try running ndk-build I get the following....
/Users/myname/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libSDL.a(SDL_render_gles.o): in function GLES_CreateRenderer:jni/SDL/src/render/opengles/SDL_render_gles.c:189: error: undefined reference to 'glDisableClientState'
collect2: ld returned 1 exit status
This of course appears to be an issue linking, however, the compiler worked just fine. I am confused as to why the linking wouldn't work but the compilation would. Anyonw know how I could fix it?
From ndk-build V=1 >Build.log Output
UPDATE:
Ok so I am taking the code found here this compiles fine, however, I am trying to upgrade to PRBoom+ so I dl the code from here and tweak the Android.mk to include the new classes. Once this is done it seems to compile fine, however, it fails to properly link. There are two main errors I see...
First is involving multiple definitions, however, the original (compiled linked fine) code had the same multiple definitions....
/Users/me/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi/objs-debug/prboom_jni/w_mmap.o: multiple definition of 'W_InitCache'
The other type is the OpenGL issues...
/Users/me/Development/Android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/libSDL.a(SDL_render_gles.o): in function GLES_ResetState:/Users/jackiegleason/Development/Code/prboom4android-base/jni/SDL/src/render/opengles/SDL_render_gles.c:181: error: undefined reference to 'glDisable'
If I copy everything back (using the prboom4android code) everything compiles and links just fine.
Here is a diff of the 2 Android.mk files...
< LOCAL_C_INCLUDES:= $(LOCAL_PATH) $(LOCAL_PATH)/include $(LOCAL_PATH)/../SDL_net/include $(LOCAL_PATH)/../SDL/include $(LOCAL_PATH)/MUSIC $(LOCAL_PATH)/MUSIC/include $(LOCAL_PATH)/TEXTSCREEN $(LOCAL_PATH)/TEXTSCREEN/include
---
> LOCAL_C_INCLUDES:= $(LOCAL_PATH) $(LOCAL_PATH)/include $(LOCAL_PATH)/../SDL_net/include $(LOCAL_PATH)/../SDL/include
28c28
< f_finale.c p_enemy.c p_spec.c r_plane.c w_mmap.c i_capture.c \
---
> f_finale.c p_enemy.c p_spec.c r_plane.c w_mmap.c \
31,36c31,33
< m_bbox.c p_inter.c p_tick.c r_things.c z_zone.c s_advsound.c memio.c \
< d_client.c i_video.c i_network.c i_system.c PCSOUND/pcsound.c PCSOUND/pcsound_sdl.c SDL/i_sshot.c \
< i_main.c sc_man.c SDL/i_sound.c jni_doom.c mus2mid.c pcm2wav.c e6y.c SDL/i_joy.c \
< r_screenmultiply.c hu_tracers.c i_smp.c g_overflow.c i_pcsound.c \
< MUSIC/dbopl.c MUSIC/flplayer.c MUSIC/portmidiplayer.c MUSIC/midifile.c MUSIC/opl_queue.c MUSIC/vorbisplayer.c MUSIC/dumbplayer.c MUSIC/oplplayer.c MUSIC/madplayer.c MUSIC/opl.c \
< TEXTSCREEN/txt_button.c TEXTSCREEN/txt_separator.c TEXTSCREEN/txt_gui.c TEXTSCREEN/txt_widget.c TEXTSCREEN/txt_checkbox.c TEXTSCREEN/txt_radiobutton.c TEXTSCREEN/txt_inputbox.c TEXTSCREEN/txt_spinctrl.c TEXTSCREEN/txt_window.c TEXTSCREEN/txt_desktop.c TEXTSCREEN/txt_scrollpane.c TEXTSCREEN/txt_io.c TEXTSCREEN/txt_strut.c TEXTSCREEN/txt_window_action.c TEXTSCREEN/txt_dropdown.c TEXTSCREEN/txt_sdl.c TEXTSCREEN/txt_label.c TEXTSCREEN/txt_table.c
---
> m_bbox.c p_inter.c p_tick.c r_things.c z_zone.c \
> d_client.c i_video.c i_network.c i_system.c \
> i_main.c i_sound.c jni_doom.c mmus2mid.c pcm2wav.c
Yes, I could download your Build.log.
Your build uses APP_PLATFORM = android-3, which does not have the necessary GL libraries. You can set APP_PLATFORM = android-14 in your Application.mk, or set the target platform for your Android project (Eclipse will update the project.properties file).
You should not add the android-14 includes manually in your Android.mk. When you have correct APP_PLATFORM, the include path will be adjusted accordingly.

error while compiling x264 in linux

Hey all
I'm trying to compile x264 under linux (x64). But it keeps throwing me an error. I've googled around but found nothing. Here's the commandline history:
spin#around:~/x264$ git clone git://git.videolan.org/x264.git
Cloning into x264...
remote: Counting objects: 13539, done.
remote: Compressing objects: 100% (4416/4416), done.
remote: Total 13539 (delta 11005), reused 11225 (delta 9082)
Receiving objects: 100% (13539/13539), 3.29 MiB | 2.79 MiB/s, done.
Resolving deltas: 100% (11005/11005), done.
spin#around:~/x264/x264$ ./configure
Found no assembler
Minimum version is yasm-0.7.0
If you really want to compile without asm, configure with --disable-asm.
spin#around:~/x264/x264$ ./configure --disable-asm
Platform: X86_64
System: LINUX
asm: no
avs: no
lavf: no
ffms: no
gpac: no
gpl: yes
thread: posix
filters: crop select_every
debug: no
gprof: no
PIC: no
shared: no
visualize: no
bit depth: 8
You can run 'make' or 'make fprofiled' now.
spin#around:~/x264/x264$ make
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -s -fomit-frame-pointer -fno-tree-vectorize -c -o x264.o x264.c
In file included from common/common.h:864,
from x264.c:33:
common/rectangle.h: In function āx264_macroblock_cache_rectā:
common/rectangle.h:84: error: āv4siā undeclared (first use in this function)
common/rectangle.h:84: error: (Each undeclared identifier is reported only once
common/rectangle.h:84: error: for each function it appears in.)
common/rectangle.h:84: error: expected ā;ā before āv16ā
common/rectangle.h:86: error: ā__m128ā undeclared (first use in this function)
common/rectangle.h:86: error: expected ā;ā before āv16ā
common/rectangle.h:87: error: expected ā;ā before āv16ā
common/rectangle.h:89: error: expected ā;ā before āv16ā
common/rectangle.h:90: error: expected ā;ā before āv16ā
make: *** [x264.o] Error 1
spin#around:~/x264/x264$
and here is the file, from line 83 to 91:
#if HAVE_VECTOREXT && defined(__SSE__)
v4si v16 = {v,v,v,v};
M128( d+s*0+0 ) = (__m128)v16;
M128( d+s*1+0 ) = (__m128)v16;
if( h == 2 ) return;
M128( d+s*2+0 ) = (__m128)v16;
M128( d+s*3+0 ) = (__m128)v16;
#else
v4si is a SSE identifier, which only exists when -msse is passed to gcc. Report a bug upstream.

Resources