Dynamic library not linking on ubuntu - linux

I am using following makefile
SHELL = /bin/sh
CXXFLAGS += -fPIC
TARGET = product_bridge.so
MYPRODUCT = /tmp/product
JAVASDK = /x86.linux/include/
CXXFLAGS += -I$(JAVASDK) -I$(JAVASDK)/linux -I$(GFCPP)/include -Wl,-rpath, -L$(MYPRODUCT)/lib -lmyproduct
SOURCES = $(shell echo *.cpp)
HEADERS = $(shell echo *.h)
OBJECTS = $(SOURCES:.cpp=.o)
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(CXX) -shared $(CXXFLAGS) -o $(TARGET) $(OBJECTS)
clean:
rm -rf *.so *.o
When I build this on ubuntu i do not see myproduct in ldd. But I am doing the same on RHEL I see myproduct in ldd
My Shared library i.e. product_bridge.so is build on RHEL

Related

How to compile a device driver into the kernel?

I have a PC and I have NIC. I run on Rocky Linux and the NIC is D-Link DFE-530TX
This is the driver I found:
http://www.opendrivers.com/download/driver-118312.html
In the /LINUX directory after unpacking there is a good linux.txt file that states the following.
Kernel Supported
================
This driver supports linux kernel version 2.2.x, 2.4.x and 2.6.x now.
For 2.6 kernel, it supported up to 2.6.18 in this version.
The full TxT file can be read here (for a year from now): https://paste.ubuntu.com/p/cVbJ2BqJvG/
My out-of-the-box Rocky 8.6 comes like this:
Operating System: Rocky Linux 8.6 (Green Obsidian)
CPE OS Name: cpe:/o:rocky:rocky:8:GA
Kernel: Linux 4.18.0-372.26.1.el8_6.x86_64
Architecture: x86-64
My question would be It is possible to compile the driver ? If the answer is yes than I would ask how I need to compile it ?
My expection is somebody will be able to explain to me the essence of the activity or be able to share a good step-by-step from which I can learn it by myself.
(I red a lot and tried in many ways without success. It fails with on the most different ways.)
Mentioned /LINUX directory contains a Makefile but make command fails if I enter.
Makefile:70: *** Linux kernel source not configured - missing version.h. Stop.
[root#iredmail LINUX]# find / -name version.h
/root/build/kernel/include/generated/uapi/linux/version.h
/usr/include/lzma/version.h
/usr/include/elfutils/version.h
/usr/include/linux/dvb/version.h
/usr/include/linux/version.h
/usr/src/kernels/4.18.0-372.26.1.el8_6.x86_64/include/config/arch/want/compat/ipc/parse/version.h
/usr/src/kernels/4.18.0-372.26.1.el8_6.x86_64/include/config/clang/version.h
/usr/src/kernels/4.18.0-372.26.1.el8_6.x86_64/include/config/gcc/version.h
/usr/src/kernels/4.18.0-372.26.1.el8_6.x86_64/include/generated/uapi/linux/version.h
/usr/src/kernels/4.18.0-372.26.1.el8_6.x86_64/include/linux/version.h
/usr/src/kernels/4.18.0-372.26.1.el8_6.x86_64/include/uapi/linux/dvb/version.h
/usr/src/kernels/4.18.0-372.26.1.el8_6.x86_64/include/xen/interface/version.h
P.S. I know there is VIA support in the kernel. Compiling a kernel takes hours and I expect compile only a driver into a ready kernel takes significantly less time. But I don't know how I need to do.
P.S.2 I am interested in any solution that avoids compiling the whole kernel. Thank you in advance.
Appendix - content of Makefile
DEBUG = 0
KSP := /lib/modules/$(shell uname -r)/build \
/usr/src/linux-$(shell uname -r) \
/usr/src/linux-$(shell uname -r | sed 's/-.*//') \
/usr/src/kernel-headers-$(shell uname -r) \
/usr/src/kernel-source-$(shell uname -r) \
/usr/src/linux-$(shell uname -r | sed 's/\([0-9]*\.[0-9]*\)\..*/\1/') \
/usr/src/linux
test_dir = $(shell [ -e $(dir)/include/linux ] && echo $(dir))
KSP := $(foreach dir, $(KSP), $(test_dir))
KSRC := $(firstword $(KSP))
ifeq (,$(KSRC))
$(error Linux kernel source not found)
endif
# check kernel version
KVER := $(shell uname -r | cut -c1-3 | sed 's/2\.[56]/2\.6/')
KERVER2=$(shell uname -r | cut -d. -f2)
ifeq ($(KVER), 2.6)
# 2.6 kernel
TARGET = rhinefet.ko
BUILTIN = via-rhine.ko
else
TARGET = rhinefet.o
BUILTIN = via-rhine.o
endif
INSTDIR := $(shell find /lib/modules/$(shell uname -r) -name $(TARGET) -printf "%h\n" | sort | head -1)
ifeq (,$(INSTDIR))
ifeq (,$(KERVER2))
ifneq (,$(wildcard /lib/modules/$(shell uname -r)/kernel))
INSTDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net
else
INSTDIR := /lib/modules/$(shell uname -r)/net
endif
else
ifneq ($(KERVER2),2)
INSTDIR := /lib/modules/$(shell uname -r)/kernel/drivers/net
else
INSTDIR := /lib/modules/$(shell uname -r)/net
endif
endif
endif
SRC = rhine_main.c rhine_proc.c rhine_wol.c rhine_hw.c
# build rule
ifeq ($(KVER), 2.6)
# 2.6 kernel
obj-m += rhinefet.o
rhinefet-objs := rhine_main.o rhine_proc.o rhine_wol.o rhine_hw.o
default:
make -C $(KSRC) SUBDIRS=$(shell pwd) modules
else
# 2.2/2.4 kernel
OBJS := rhine_main.o rhine_proc.o rhine_wol.o rhine_hw.o
VERSION_FILE := $(KSRC)/include/linux/version.h
CONFIG_FILE := $(KSRC)/include/linux/config.h
ifeq (,$(wildcard $(VERSION_FILE)))
$(error Linux kernel source not configured - missing version.h)
endif
ifeq (,$(wildcard $(CONFIG_FILE)))
$(error Linux kernel source not configured - missing config.h)
endif
ifneq (,$(findstring egcs-2.91.66, $(shell cat /proc/version)))
CC := kgcc gcc cc
else
CC := gcc cc
endif
test_cc = $(shell which $(cc) > /dev/null 2>&1 && echo $(cc))
CC := $(foreach cc, $(CC), $(test_cc))
CC := $(firstword $(CC))
CFLAGS += -Wall -DLINUX -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -D__NO_VERSION__ -O2 -pipe
CFLAGS += -I$(KSRC)/include -I. -Wstrict-prototypes -fomit-frame-pointer
CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
echo "-DMODVERSIONS -include $(KSRC)/include/linux/modversions.h")
.SILENT: $(TARGET) clean
# look for SMP in config.h
SMP := $(shell $(CC) $(CFLAGS) -E -dM $(CONFIG_FILE) | \
grep CONFIG_SMP | awk '{ print $$3 }')
ifneq ($(SMP),1)
SMP := 0
endif
ifeq ($(DEBUG),1)
CFLAGS += -DRHINE_DBG
endif
ifeq ($(SMP), 1)
CFLAGS += -D__SMP__
endif
# check x86_64
SUBARCH := $(shell uname -m)
ifeq ($(SUBARCH),x86_64)
CFLAGS += -mcmodel=kernel -mno-red-zone
endif
$(TARGET): $(filter-out $(TARGET), $(SRC:.c=.o))
$(LD) -r $^ -o $#
echo; echo
echo "**************************************************"
echo "Build options:"
echo " VERSION $(shell uname -r)"
echo -n " SMP "
if [ "$(SMP)" = "1" ]; \
then echo "Enabled"; else echo "Disabled"; fi
echo "**************************************************"
endif # ifeq ($(KVER),2.6)
ifeq ($(KVER), 2.6)
install: default
else
install: clean $(TARGET)
endif
mkdir -p $(MOD_ROOT)$(INSTDIR)
install -m 644 -o root $(TARGET) $(MOD_ROOT)$(INSTDIR)
#if [ -f $(MOD_ROOT)$(INSTDIR)/$(BUILTIN) ] ; then \
echo "***** Move official driver $(BUILTIN) to $(BUILTIN).backup file" ; \
echo "mv $(MOD_ROOT)$(INSTDIR)/$(BUILTIN) $(MOD_ROOT)$(INSTDIR)/$(BUILTIN).backup";\
mv $(MOD_ROOT)$(INSTDIR)/$(BUILTIN) $(MOD_ROOT)$(INSTDIR)/$(BUILTIN).backup ; \
echo ;\
fi ;
#if [ -f $(MOD_ROOT)$(INSTDIR)/linuxfet.o ] ; then \
echo "***** Move previous driver linuxfet.o to linuxfet.o.backup" ; \
echo "mv $(MOD_ROOT)$(INSTDIR)/linuxfet.o $(MOD_ROOT)$(INSTDIR)/linuxfet.o.backup";\
mv $(MOD_ROOT)$(INSTDIR)/linuxfet.o $(MOD_ROOT)$(INSTDIR)/linuxfet.o.backup ; \
echo ;\
fi ;
ifeq (,$(MOD_ROOT))
/sbin/depmod -a || true
else
/sbin/depmod -b $(MOD_ROOT) -a || true
endif
uninstall:
rm -f $(INSTDIR)/$(TARGET)
#if [ -f $(MOD_ROOT)$(INSTDIR)/$(BUILTIN).backup ] ; then \
echo "***** Restore official driver $(BUILTIN) from $(MOD_ROOT)$(INSTDIR)".; \
echo "mv $(MOD_ROOT)$(INSTDIR)/$(BUILTIN).backup $(MOD_ROOT)$(INSTDIR)/$(BUILTIN)";\
mv $(MOD_ROOT)$(INSTDIR)/$(BUILTIN).backup $(MOD_ROOT)$(INSTDIR)/$(BUILTIN) ;\
fi
/sbin/depmod -a
clean:
rm -f $(SRC:.c=.o) rhinefet.o rhinefet.ko rhinefet.mod.c rhinefet.mod.o *~
If I need to add anything to this question please comment it.
I'm afraid you will not be able to build a driver which is supported up to 2.6.18 and your kernel is 4.18.
Good news is that this NIC has upstream Linux driver for quite some time now, look here at the source of 4.18. As per Makefile, it is enabled via CONFIG_SUNDANCE. So I believe this NIC should work out of the box.
If not, you might want to build just this driver as a module for your current kernel. How to do that - this falls out of the scope of this question.

Makefile : No rule to make target

I have a problem with Makefile. It should compile a .c file to an object file only if the .c file has been modified.
But I have an error when I use all rule:
make: *** No rule to make target `obj/main.o', needed by `ft_ls'. Stop.
When I use manually it works:
clang -Wall -Wextra -Werror -Iinclude -o obj/main.o -c src/main.c
My work directory:
Makefile include/*.h libft/libft.a src/*.c
Makefile content:
NAME = ft_ls
SRC_PATH = src
OBJ_PATH = obj
CPPFLAGS = -Iinclude
LDFLAGS = -Llibft
LDLIBS = -lft
CFLAGS = -Werror -Wall -Wextra
CC = clang
SRC_NAME = main.c\
ft_type.c\
ft_right.c\
ft_putright.c\
ft_date_converter.c
OBJ_NAME = $(SRC_NAME:.c=.o)
SRC = $(addprefix $(SRC_PATH)/,$(SRC_NAME))
OBJ = $(addprefix $(OBJ_PATH)/,$(OBJ_NAME))
all: $(NAME)
$(NAME): $(OBJ)
$(CC) $(LDFLAGS) $(LDLIBS) $^ -o $#
make -C libft
$(OBJ_PATH)%.o: $(SRC_PATH)%.c
#mkdir $(OBJ_PATH) 2> /dev/null || true
$(CC) $(CFLAGS) $(CPPFLAGS) -o $# -c $<
clean:
rm -fv $(OBJ)
make -C libft clean
#rmdir $(OBJ_PATH) 2> /dev/null || true
fclean: clean
rm -fv $(NAME)
make -C libft fclean
re: fclean all
.PHONY: all, clean, fclean, re
this dependency line:
$(OBJ_PATH)%.o: $(SRC_PATH)%.c
concatenates $(OBJ_PATH) with the object name, but there's a / missing, should be
$(OBJ_PATH)/%.o: $(SRC_PATH)/%.c
else it expands (ex: for main) to:
objmain.o : srcmain.c

MakeFile error "/usr/bin/f77: Illegal option: -autodouble"

I have written a make file as following:
COMPFLAGS = -O3 -autodouble
CFLAGS = $(COMPFLAGS)
PFLAGS = $(COMPFLAGS)
FFLAGS = $(COMPFLAGS)
CCFLAGS = $(COMPFLAGS)
CXXFLAGS = $(COMPFLAGS)
LD = ifort
LDFLAGS = $(COMPFLAGS)
MAKEFILE = Makefile
OBJS = f1.o \
f2.o \
f3.o \
PROGRAM = f1
all: $(PROGRAM)
%.o: %.f90
#$(LD) $(COMPFLAGS) -c $<
$(PROGRAM): $(OBJS) $(MAKEFILE)
#$(LD) $(LDFLAGS) $(OBJS) -o $(PROGRAM)
#echo "done"
clean:
#rm -f $(OBJS) core
when I execute make I get the following error:
f77 -O3 -autodouble -c -o f1.o f1.f
/usr/bin/f77: Illegal option: -autodouble
make: *** [f1.o] Error 255
I should note that there is no *.f file, all files are *.f90.
Could you please advise me where I have made mistake?
Thanks a lot.
This looks unusual:
LD = ifort
...
%.o: %.f90
#$(LD) $(COMPFLAGS) -c $<
LD is the linker, not the compiler. Perhaps something like:
CC = ifort
...
%.o: %.f90
#$(CC) -std=f90 $(COMPFLAGS) -c $<
You might also need the -x option to tell the machinery is Fortran 90 and not something to be preprocessed:
%.o: %.f90
#$(CC) -x f90 -std=f90 $(COMPFLAGS) -c $<

Cross compile for RISCV

I have a C program that I want to compile it for RISCV ISA. I have followed their instruction for installing the tools. Their tools work correctly and I can compile a "Hello world!" C program and run it. But right now I want to compile another C program that contains multiple files. I tried to change the makefile and instead of using gcc, I replace it with their compiler name riscv64-unknown-linux-gnu-gcc but I got:
Relocations in generic ELF (EM: 62)
error, then I tried to set CC = riscv64-unknown-linux-gnu-gcc but I got another error about pthread
unrecognized command line option '-pthread'
My question is that should I change the make file to use their compiler?
Thanks for your help in advance.
DEBUG := 0
PROFILE := 0
MRSFAST_VERSION := "3.3.1"
BUILD_DATE := "$(shell date)"
all: OPTIMIZE_FLAGS build
debug: DEBUG_FLAGS build
profile: PROFILE_FLAGS build
build: clean-executable SSE_FLAGS compile mrsfast snp_indexer clean
LDFLAGS=#-static
LIBS=-lz -lm -pthread -lpthread
CFLAGS=-fno-pic -DMRSFAST_VERSION=\"$(MRSFAST_VERSION)\" -DBUILD_DATE=\"$(BUILD_DATE)\"
objects=baseFAST.o Sort.o MrsFAST.o Common.o CommandLineParser.o RefGenome.o HashTable.o Reads.o Output.o SNPReader.o HELP.o
compile: $(objects)
mrsfast:
ifeq ($(shell uname -s),Linux)
gcc -w $(objects) -o $# ${LDFLAGS} ${LIBS}
else
gcc -Wl,-no_pie -fno-pic -w $(objects) -o $# ${LDFLAGS} ${LIBS}
endif
snp_indexer: SNPIndexer.o
gcc $^ -o $# ${LDFLAGS} ${LIBS}
clean:
#rm -f $(objects)
#rm -f SNPIndexer.o
#rm -f HELPstub.c
#rm -f HELPstub.o
clean-executable:
#rm -f mrsfast
HELP.o:
#groff -Tascii -man ./HELP.man > HELP
ifeq ($(shell uname -s),Linux)
#ld -r -b binary -o HELP.o HELP
else
#touch HELPstub.c
gcc -o HELPstub.o -c HELPstub.c
ld -r -o HELP.o -sectcreate binary HELP HELP HELPstub.o
endif
DEBUG_FLAGS:
$(eval CFLAGS = $(CFLAGS) -ggdb)
$(eval LIBS = $(LIBS) -ggdb)
OPTIMIZE_FLAGS:
$(eval CFLAGS = $(CFLAGS) -O2)
PROFILE_FLAGS:
$(eval CFLAGS = $(CFLAGS) -pg -g)
$(eval LIBS = $(LIBS) -pg -g)
SSE_FLAGS:
ifeq ($(shell uname -s),Linux)
ifeq ($(with-sse4),no)
$(shell echo "-DSSE4=0")
else
$(eval CFLAGS = $(CFLAGS) \
$(shell gv=`gcc -dumpversion`; \
sc=`grep -c "sse4" /proc/cpuinfo`; \
echo $$sc.$$gv | awk -F. '{if($$1>0 && $$2>=4 && $$3>=4) print "-DSSE4=1 -msse4.2"; else print "-DSSE4=0"}'))
endif
else
ifeq ($(with-sse4),no)
$(shell echo "-DSSE4=0")
else
$(eval CFLAGS = $(CFLAGS) \
$(shell gv=`gcc -dumpversion`; \
sc=`sysctl -n machdep.cpu.features | grep -c "SSE4"` ;\
echo $$sc.$$gv | awk -F. '{if($$1>0 && $$2>=4 && $$3>=4) print "-DSSE4=1 -msse4.2"; else print "-DSSE4=0"}'))
endif
endif

How can I fix a error of compile on linux

I'm using the cross compiler (arm-none-linux-gnueabi) and I wanna build a libs3-2.0 source, but I get the following error when I try to compile.
libs3-2.0$ sudo make
make: *** No rule to make target `libxml/parser.h', needed by `build/obj/simplexml.do'. Stop.
What can I do to solve this issue? Below is the (GNU) Makefile.
working directory: /home/usrname/prj/app/framework/camera/cdma_manage/<br>
///////////////////////////////////////////////////////////////////////////////////////////
LIBS3_VER_MAJOR ?= 2
LIBS3_VER_MINOR ?= 0
LIBS3_VER := $(LIBS3_VER_MAJOR).$(LIBS3_VER_MINOR)
ifdef VERBOSE
VERBOSE = true
VERBOSE_ECHO = # echo
VERBOSE_SHOW =
QUIET_ECHO = # echo > /dev/null
else
VERBOSE = false
VERBOSE_ECHO = # echo > /dev/null
VERBOSE_SHOW = #
QUIET_ECHO = # echo
endif
ifndef BUILD
ifdef DEBUG
BUILD := build-debug
else
BUILD := build
endif
endif
ifndef DESTDIR
DESTDIR := /usr
endif
ifndef CURL_LIBS
CURL_LIBS := $(shell curl-config --libs)
endif
ifndef CURL_CFLAGS
CURL_CFLAGS := $(shell curl-config --cflags)
endif
ifndef LIBXML2_LIBS
LIBXML2_LIBS := $(shell xml2-config --libs)
endif
ifndef LIBXML2_CFLAGS
LIBXML2_CFLAGS := $(shell xml2-config --cflags)
endif
ifndef LIBXML2_LIBS
LIBXML2_LIBS := -L../libxml2-2.7.2/.libs -lxml2 -lm
endif
ifndef LIBXML2_CFLAGS
LIBXML2_CFLAGS := -I/home/usrname/prj/app/framework/camera/cdma_manage/libxml2-2.7.2/include
endif
ifndef CFLAGS
ifdef DEBUG
CFLAGS := -g
else
CFLAGS := -O3
endif
endif
CFLAGS += -Wall -Werror -Wshadow -Wextra -Iinc \
$(CURL_CFLAGS) $(LIBXML2_CFLAGS) \
-DLIBS3_VER_MAJOR=\"$(LIBS3_VER_MAJOR)\" \
-DLIBS3_VER_MINOR=\"$(LIBS3_VER_MINOR)\" \
-DLIBS3_VER=\"$(LIBS3_VER)\" \
-D__STRICT_ANSI__ \
-D_ISOC99_SOURCE \
-D_POSIX_C_SOURCE=200112L
LDFLAGS = $(CURL_LIBS) $(LIBXML2_LIBS) -lpthread
.PHONY: all
all: exported test
.PHONY: exported
exported: libs3 s3 headers
.PHONY: install
install: exported
$(QUIET_ECHO) $(DESTDIR)/bin/s3: Installing executable
$(VERBOSE_SHOW) install -Dps -m u+rwx,go+rx $(BUILD)/bin/s3 \
$(DESTDIR)/bin/s3
$(QUIET_ECHO) \
$(DESTDIR)/lib/libs3.so.$(LIBS3_VER): Installing shared library
$(VERBOSE_SHOW) install -Dps -m u+rw,go+r \
$(BUILD)/lib/libs3.so.$(LIBS3_VER_MAJOR) \
$(DESTDIR)/lib/libs3.so.$(LIBS3_VER)
$(QUIET_ECHO) \
$(DESTDIR)/lib/libs3.so.$(LIBS3_VER_MAJOR): Linking shared library
$(VERBOSE_SHOW) ln -sf libs3.so.$(LIBS3_VER) \
$(DESTDIR)/lib/libs3.so.$(LIBS3_VER_MAJOR)
$(QUIET_ECHO) $(DESTDIR)/lib/libs3.so: Linking shared library
$(VERBOSE_SHOW) ln -sf libs3.so.$(LIBS3_VER_MAJOR) $(DESTDIR)/lib/libs3.so
$(QUIET_ECHO) $(DESTDIR)/lib/libs3.a: Installing static library
$(VERBOSE_SHOW) install -Dp -m u+rw,go+r $(BUILD)/lib/libs3.a \
$(DESTDIR)/lib/libs3.a
$(QUIET_ECHO) $(DESTDIR)/include/libs3.h: Installing header
$(VERBOSE_SHOW) install -Dp -m u+rw,go+r $(BUILD)/include/libs3.h \
$(DESTDIR)/include/libs3.h
.PHONY: uninstall
uninstall:
$(QUIET_ECHO) Installed files: Uninstalling
$(VERBOSE_SHOW) \
rm -f $(DESTDIR)/bin/s3 \
$(DESTDIR)/include/libs3.h \
$(DESTDIR)/lib/libs3.a \
$(DESTDIR)/lib/libs3.so \
$(DESTDIR)/lib/libs3.so.$(LIBS3_VER_MAJOR) \
$(DESTDIR)/lib/libs3.so.$(LIBS3_VER)
$(BUILD)/obj/%.o: src/%.c
$(QUIET_ECHO) $#: Compiling object
# mkdir -p $(dir $(BUILD)/dep/$<)
# /opt/armv7/codesourcery/bin/arm-none-linux-gnueabi-gcc $(CFLAGS) -M -MG -MQ $# -DCOMPILINGDEPENDENCIES \
-o $(BUILD)/dep/$(<:%.c=%.d) -c $<
# mkdir -p $(dir $#)
$(VERBOSE_SHOW) /opt/armv7/codesourcery/bin/arm-none-linux-gnueabi-gcc $(CFLAGS) -o $# -c $<
$(BUILD)/obj/%.do: src/%.c
$(QUIET_ECHO) $#: Compiling dynamic object
# mkdir -p $(dir $(BUILD)/dep/$<)
# /opt/armv7/codesourcery/bin/arm-none-linux-gnueabi-gcc $(CFLAGS) -M -MG -MQ $# -DCOMPILINGDEPENDENCIES \
-o $(BUILD)/dep/$(<:%.c=%.dd) -c $<
# mkdir -p $(dir $#)
$(VERBOSE_SHOW) /opt/armv7/codesourcery/bin/arm-none-linux-gnueabi-gcc $(CFLAGS) -fpic -fPIC -o $# -c $<
LIBS3_SHARED = $(BUILD)/lib/libs3.so.$(LIBS3_VER_MAJOR)
LIBS3_STATIC = $(BUILD)/lib/libs3.a
.PHONY: libs3
libs3: $(LIBS3_SHARED) $(LIBS3_STATIC)
LIBS3_SOURCES := acl.c bucket.c error_parser.c general.c \
object.c request.c request_context.c \
response_headers_handler.c service_access_logging.c \
service.c simplexml.c util.c
$(LIBS3_SHARED): $(LIBS3_SOURCES:%.c=$(BUILD)/obj/%.do)
$(QUIET_ECHO) $#: Building shared library
# mkdir -p $(dir $#)
$(VERBOSE_SHOW) /opt/armv7/codesourcery/bin/arm-none-linux-gnueabi-gcc -shared -Wl,-soname,libs3.so.$(LIBS3_VER_MAJOR) \
-o $# $^ $(LDFLAGS)
$(LIBS3_STATIC): $(LIBS3_SOURCES:%.c=$(BUILD)/obj/%.o)
$(QUIET_ECHO) $#: Building static library
# mkdir -p $(dir $#)
$(VERBOSE_SHOW) $(AR) cr $# $^
... abbriviated.
//////////////////////////////////////////////////////////////////////////////////////////////
The issue seems to be that libxml/parser.h isn't found by make, but it's needed to build something else. Have you checked that this file is in the include paths?
ifndef LIBXML2_CFLAGS
LIBXML2_CFLAGS := -I/home/usrname/prj/app/framework/camera/cdma_manage/libxml2-2.7.2/include
endif
should added before
ifndef LIBXML2_CFLAGS
LIBXML2_CFLAGS := $(shell xml2-config --cflags)
endif

Resources