Hi Sam,
Thanks for the guidance.
I copied my code into the /webports/src/ports/<code-root-directory> and using the command TOOLCHAIN=pnacl ../../build_tools/nacl-configure.sh ./configure, I tried to configure.
I got the error "configure script not found: ./configure "
Then I thought of trying the command in this way "TOOLCHAIN=pnacl ../../build_tools/nacl-configure.sh ./autogen.sh" as my code contains autogen.sh file but I got this
errorFailed to find patch 0 location in configure script: ./autogen.sh
Failed to find patch 1 location in configure script: ./autogen.sh
Failed to find patch 2 location in configure script: ./autogen.sh
Failed to find config.sub (./config.sub).
Please specify using $CONFIG_SUB.
Because of this, I tried to run only "sh autogen.sh" in my code which went through and generated configure file and then I ran this command again
TOOLCHAIN=pnacl ../../build_tools/nacl-configure.sh ./configure
Actually autogen file script installs autoreconf and does the configure operation.
This worked and it created Makefile with correct CC,CFFLAGS as per the pnacl architecture. Is this the way to do? or I missed something?
My next step is to run make as Makefile is proper as per pnacl architecture now.
I ran "make" command under my code root directory it shows me these error:
error: variable has incomplete type 'struct timeval'
error: use of undeclared identifier 'MSG_NOSIGNAL'
These errors are from my code only. These two errors are due to the reason MSG_NOSIGNAL is defined in #include <sys/socket.h> and struct timeval is defined in #include <sys/time.h>.
As these two header files are linux supported, I think pnacl is not able to get them. Any guess how to fix this issue? Do we need to get pnacl equivalent of these? Or do you think the generated Makefile is not having the correct values?
When I make gcc build on my ubuntu machine the same code goes through without any error which is obvious.
Could you please also let me know how to use build_tools/nacl-make.sh file to make a build correctly? like the command you suggested for configure as "TOOLCHAIN=pnacl ../../build_tools/nacl-configure.sh ./configure".
Thanks & regards,
Anoop.
CC =nacl_sdk/pepper_47/toolchain/linux_pnacl/bin/pnacl-clang
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP =nacl_sdk/pepper_47/toolchain/linux_pnacl/bin/pnacl-clang -E
CPPFLAGS = -I/nacl_sdk/pepper_47/include
CXX = nacl_sdk/pepper_47/toolchain/linux_pnacl/bin/pnacl-clang++
CXXCPP = nacl_sdk/pepper_47/toolchain/linux_pnacl/bin/pnacl-clang++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
LDFLAGS =
-L/nacl_sdk/pepper_47/lib/pnacl/Release
build = x86_64-unknown-linux-gnu
build_alias =
build_cpu = x86_64
build_os = linux-gnu
install_sh = ${SHELL}
/home/anoop/webports/src/ports/pdl_converter/install-sh
Please try to answer my queries posed in previous mail by lloking these env if required.
Many many thanks in advance.
Thanks & regards,
Anoop.