Hello All,
I am trying to cross compile perl for dm365 target, can any one assist/suggest me with detailed procedure to build perl for dm365 .
Thanks & Regards
Ranjan.D
Bangalore
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello All,
I am trying to cross compile perl for dm365 target, can any one assist/suggest me with detailed procedure to build perl for dm365 .
Thanks & Regards
Ranjan.D
Bangalore
Hi Ranjan,
You should start by unpacking perl-X.Y.Z-cross-W.Q.tar.gz over perl-X.Y.Z distribution. It will overwrite some of the files; that's ok.
The build process is similar to that of most autoconfed packages.
1. For a cross-build, specify your target:
./configure --prefix=/usr --target=i586-pc-linux-uclibc make make DESTDIR=/some/tmp/dir install
instead of "i586-pc-linux-uclibc" use ur tool chain.
2. You can get help by "configure --help" option and "man perl".
Also can I know what are you trying to run with perl?
Hello Prashanth,
First of all thanks a lot for providing information, As per your post i was trying to build but ended up with following error
Looking how to get error messages ... strerror()
Looking for a random number function ... good, found drand48()
Looking what times() may return ... it's not clock_t, assuming long
Checking whether prctl supports PR_SET_NAME ... yes
Checking if compiler supports __attribute__(format) ... yes
Checking if compiler supports __attribute__(malloc) ... yes
Checking if compiler supports __attribute__(nonnull) ... yes
Checking if compiler supports __attribute__(noreturn) ... yes
Checking if compiler supports __attribute__(pure) ... yes
Checking if compiler supports __attribute__(unused) ... yes
Checking if compiler supports __attribute__(warn_unused_result) ... yes
Checking to see if your C compiler knows about "volatile" ... yes
Checking whether to enable -g ... no
Checking whether to use -DDEBUGGING ... no
Checking whether ld supports scripts ... yes
Checking whether it's ok to enable large file support ... yes, enabling it
Generating xconfig.sh
Configuring primary perl executable for arm-none-linux-gnueabi (arm-none-linux-gnueabi)
Getting the current patchlevel...
revision=5
patchlevel=16
subversion=3
api_revision=5
api_version=16
api_subversion=0
patchlevel=
You have perl5 version 16 subversion 3
Checking which hints to use
using cnf/hints/linux
using cnf/hints/default
Checking for C compiler ... none found
ERROR: no C compiler found
Checking for linker ... none found
ERROR: no linker found
Checking for ar ... none found
ERROR: no ar found
Checking for ranlib ... none found
Checking for readelf ... readelf
Checking for objdump ... none found
ERROR: no objdump found
ERROR: configure --mode=target failed
with the attached document you find the full log.
FYI: i was using perl version: perl-5.16.3
and perl-5.16.3-cross-0.7.4.tar.gz over it
(i have found addition of many files under conf directory after unpacking perl-5.16.3-cross-0.7.4.tar.gz, also noticed two configure files, "Configure" & "configure")
both gives different flags and arguments when executed help:
./Configure --help:
Usage: Configure [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
[-U symbol] [-U symbol=] [-A command:symbol...]
-d : use defaults for all answers.
-e : go on without questioning past the production of config.sh.
-f : specify an alternate default configuration file.
-h : print this help message and exit (with an error status).
-r : reuse C symbols value if possible (skips costly nm extraction).
-s : silent mode, only echoes questions and essential information.
-D : define symbol to have some value:
-D symbol symbol gets the value 'define'
-D symbol=value symbol gets the value 'value'
common used examples (see INSTALL for more info):
-Duse64bitint use 64bit integers
-Duse64bitall use 64bit integers and pointers
-Dusethreads use thread support
-Dinc_version_list=none do not include older perl trees in @INC
-DEBUGGING=none DEBUGGING options
-Dcc=gcc choose your compiler
-Dprefix=/opt/perl5 choose your destination
-E : stop at the end of questions, after having produced config.sh.
-K : do not use unless you know what you are doing.
-O : let -D and -U override definitions from loaded configuration file.
-S : perform variable substitutions on all .SH files (can mix with -f)
-U : undefine symbol:
-U symbol symbol gets the value 'undef'
-U symbol= symbol gets completely empty
e.g.: -Uversiononly
-A : manipulate symbol after the platform specific hints have been applied:
-A append:symbol=value append value to symbol
-A symbol=value like append:, but with a separating space
-A define:symbol=value define symbol to have value
-A clear:symbol define symbol to be ''
-A define:symbol define symbol to be 'define'
-A eval:symbol=value define symbol to be eval of value
-A prepend:symbol=value prepend value to symbol
-A undef:symbol define symbol to be 'undef'
-A undef:symbol= define symbol to be ''
e.g.: -A prepend:libswanted='cl pthread '
-A ccflags=-DSOME_MACRO
-V : print version number and exit (with a zero status).
___________________________________________________
./configure --help
configure [options]
configure adheres to common GNU autoconf style, but also accepts most
of the original Configure options. Both short (-D) and long (--define)
options are supported. Valid ways to supply arguments for the options:
-f config.sh, -fconfig.sh -D key=val, -Dkey=val, --set-key=val, --set key=val.
Whenever necessary, dashes in "key" are converted to underscores so it's ok
to use --set-d-something instead of --set-d_something.
The options themselves are either self-explainatory or too obscure to be
documented here. In latter case check which config.sh variable you're
interested in and refer to Porting/Glossary for description.
--help show this message
--mode=<mode> (don't use this)
--mode=cross Force cross-compilation mode
--regenerate Re-generate config.h, xconfig.h
and Makefile.config
from config.sh and xconfig.sh
--prefix=/usr Installation prefix
--html1dir=<dir> For HTML documentation
--html3dir=<dir>
--man1dir=<dir> For manual pages
--man3dir=<dir>
--build=<machine> Default prefix for $HOSTCC etc.
--target=<machine> Same, for primary $CC
--target-tools-prefix=<p> same, but doesn't affect targetarch etc.
--hints=<h1>,<h2>,... Use specified hints (cnf/hints/<h1> etc.)
Does not affect hint selection for modules
--with-libs=<libs> Comma-separated list of libraries to use
(only basenames, use "dl" to have -ldl
passed to linker)
--with-cc= C compiler
--with-cpp= C preprocessor
--with-ranlib= ranlib; set to 'true' or 'echo' if
you don't need it
--with-objdump= objdump; only needed for some tests
--host-cc= Same, for host/build system
--host-cpp= (only useful when cross-compiling)
--host-ranlib=
--host-objdump=
--host-libs=
--sysroot= path to (copy of) target system root
Options from the original Configure which are not supported or make
no sense for this version of configure:
-e go on without questioning past the production
of config.sh (ignored)
-E stop at the end of questions, after having
produced config.sh (ignored)
-r reuse C symbols value if possible, skips costly
nm extraction (ignored, other method is used)
-s silent mode (ignored)
-K (not supported)
-S perform variable substitutions on all .SH files
(ignored)
-V show version number (not supported)
The following options are used to manipulate the values configure will
write to config.sh. Check Porting/Glossary for the list of possible
symbols.
-d (ignored) use defaults for all answers.
-f file.sh load configuration from specified file
-h (ignored)
-D symbol[=value] define symbol to have some value:
-D symbol symbol gets the value 'define'
-D symbol=value symbol gets the value 'value'
common used examples (see INSTALL for more info):
-Duse64bitint use 64bit integers
-Duse64bitall use 64bit integers and pointers
-Dusethreads use thread support (also --use-threads)
-Dinc_version_list=none do not include older perl trees in @INC
-DEBUGGING=none DEBUGGING options
-Dcc=gcc same as --with-cc=gcc
-Dprefix=/opt/perl5 same as --prefix=/opt/perl5
-O let -D and -U override definitions
from loaded configuration file.
-U symbol undefine symbol:
-U symbol symbol gets the value 'undef'
-U symbol= symbol gets completely empty
e.g.: -Uversiononly
-A [a:]symbol=value manipulate symbol after the platform specific
hints have been applied:
-A append:symbol=value append value to symbol
-A symbol=value like append:, but with a separating space
-A define:symbol=value define symbol to have value
-A clear:symbol define symbol to be ''
-A define:symbol define symbol to be 'define'
-A eval:symbol=value define symbol to be eval of value
-A prepend:symbol=value prepend value to symbol
-A undef:symbol define symbol to be 'undef'
-A undef:symbol= define symbol to be ''
e.g.: -A prepend:libswanted='cl pthread '
-A ccflags=-DSOME_MACRO
--enable-<something> Set use<something> to 'define'
--has-<function> Set d_<function> to 'define'
--include-<header>[=yes|no] Set i_<header> to 'define' or 'undef'
e.g. for <sys/time.h>:
--include-sys-time-h=no
--set symbol=value Set symbol to value
When configuring a cross-build, -D/--set and other similar options affect
target perl configuration (config.sh) only. Use the following options if
you need to tweak xconfig.sh:
--host-<option>[=value] Pass --<option>[=value] to miniperl
configure on the host system (xconfig.sh)
e.g. --host-define-foo, --host-set-foo=bar
--target-<option>[=value] (same for tconfig.sh; do not use)
Generally configure tries to build all modules it can find in the source tree.
Use the following options to alter modules list:
--static-mod=mod1,mod2,... Build specified modules statically
--disable-mod=mod1,mod2,... Do not build specified modules
modX should be something like
cpan/Archive-Extract
static only applies to XS modules
--only-mod=mod1,mod2,... Build listed modules only
--disable-disabled-mods Do not generate make rules for
disabled modules. Without this option,
any module found by counfigure can be built
manually with "make cpan/Module-Name".
--all-static Build all found XS modules as static
unless specified otherwise
_____________________________________________
And the purpose of building perl on dm365 is, i need to develop cgi scripts (perl) for interacting with a web server.
Regards
Ranjan.D
Bangalore
Hi Ranjan,
If you want to interact with web server. We already have IPNC reference software which does the job. In IPNC software we can control many features like resolution, quality, number of channels type of codec.
to get IPNC software you need to contact the TI contact person.
Hello Prashanth,
Your suggestion for referring IPNC software is appreciated, but as per my constraints i have to stick to perl as we have to reuse couple of module. so, further guidance in this regard would be well appreciated.
looking forward for your prompt reply,
Thanks & Regards
Ranjan.D
Bangalore.