Software migration cross-compilation

strip: Unable to recognise the format of the input file

Sometimes U got error while doing 'make install' :
strip: Unable to recognise the format of the input file

This is because the flag "INSTALLSTRIP = -s" in file config.mak
will pass to 'install' application while you do "make install" ..........
disable the flag "INSTALLSTRIP = " and make install.;0)

Or edit flag "INSTALL = $your_arm_install_application"

PS; ==============================================
General Occurs during cross compilation.
Because the install program during installation detects the flag INSTALLSTRIP = -s ---- that is, you need to
execute strip to remove some useless symbols. At this time, strip is only the host machine, so the
target machine's files cannot be stripped.

 

=== Simply put, when cross-compiling, remove -s from strip orz365.

hy: Or change the strip to the strip of the target machine.

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Detailed explanation of the Configure option configuration parameters in Linux

Software installation in the Linux environment is not an easy task; if it is installed after compiling from the source code, of course the matter is more complicated; now the tutorials for installing various software are very common; but it is inseparable, right With a solid grasp of the basic knowledge, the problem of installing various software will be solved. Configure script configuration tool is one of the foundations, it is the basic application of autoconf tools.

Compared with some skills, Configure appears to be more basic. Of course, it is a bit boring to use and learn. Of course, you must become a master, and the basic familiarity cannot be surpassed.

For this reason, I reprinted a detailed introduction about Configure option configuration. For your reference, the'configure' script has a large number of command line options. For different software packages, these options may change, but many basic options will not change. Run'configure' with the'--help' option 'The script can see all the options available. Although many options are rarely used, when you configure a package for special needs, it is useful to know their existence.

A brief introduction to each option is given below:

--Cache-file=FILE'configure
' will test existing features (or bugs!) on your system. In order to speed up subsequent configuration, the results of the test will be stored in a cache file. When configuring one in each subtree When there are complex source trees with'configure' scripts, the existence of a good cache file will help a lot.

--Help
output help information. Even experienced users occasionally need to use the'--help' option, because a complex project will contain additional options. For example, the'configure' script in the GCC package contains a script that allows you to control Whether to generate and use the GNU assembler option in GCC.


One of the main functions in --no-create'configure ' will make an output file. This option prevents'configure' from generating this file. You can think of this as a dry run, although the cache is still overwritten.

--Quiet --silent
When'configure

' performs its test, it will output a brief message to tell the user what it is doing. This is because'configure' may be slow, and the user will be thrown aside without this output Doubt what is going on. Using either of these two options will throw you aside. (Annotation: These two sentences are more interesting, the original is this: If there was no such output, the user would be left wondering what is happening. By using this option, you too can be left wondering!)

--Version
Print the version number of Autoconf used to generate the'configure' script.

--Prefix=preFIX (location of file installation)
'--prefix' is the most commonly used option. The created'Makefile ' will view the parameters passed with this option, and when a package is installed, its structure can be completely relocated independently Part. For example, when installing a package, say Emacs, the following command will cause the Emacs Lisp file to be installed to "/opt/gnu/share":
$ ./configure --prefix=/opt/gnu/share

--Exec-prefix=EPREFIX is
similar to the' --prefix ' option, but it is used to set the installation location of the structure-dependent file. The compiled'emacs' binary file is such a file. If this option is not set, it is used by default The option value of will be set to the same as the'--prefix' option value.

--Bindir=DIR
specifies the installation location of the binary file. The binary file here is defined as a program that can be directly executed by the user.

--Sbindir=DIR
specifies the installation location of super binary files. These are some programs that can only be executed by super users.

--Libexecdir=DIR (package directory, program call)
specifies the installation location of executable support files. In contrast to binary files, these files are never directly executed by the user, but can be executed by the binary files mentioned above.

--Datadir=DIR
specifies the installation location of general data files.

--Sysconfdir=DIR (/etc configuration file directory)
specifies the installation location of read-only data used on a single machine.

--Sharedstatedir=DIR
specifies the installation location of writable data that can be shared on multiple machines.

--Localstatedir=DIR
specifies the installation location of writable data that can only be used on a single machine.

--Libdir=DIR (library file directory)
specifies the installation location of the library file.

--Includedir=DIR
specifies the installation location of C header files. Other languages ​​such as C++ header files can also use this option.

--Oldincludedir=DIR
specifies the installation location of the C header files installed by the compiler other than GCC.

--Infodir=DIR
specifies the installation location of Info format documents. Info is the document format used by the GNU Project.

--Mandir=DIR (installation directory of the help document)
specifies the installation location of the man page.

The --srcdir=DIR
option has no effect on the installation. It will tell the location of the'configure ' source code. Generally speaking, you don't need to specify this option, because the'configure' script is generally in the same directory as the source file.

--Program-prefix=PREFIX
specifies the prefix that will be added to the name of the installed program. For example, using'--program-prefix=g' to configure a program named'tar' will cause the installed program to be named 'gtar'. When used with other installation options, this option will only work if it is used by the `Makefile.in' file.

--Program-suffix=SUFFIX
specifies the suffix that will be added to the name of the installed program.

--Program-transform-name=PROGRAM
where PROGRAM is a sed script. When a program is installed, its name will go through `sed -e PROGRAM' to generate the installed name.

--Build=BUILD
Specify the system platform on which the package is installed. If not specified, the default value will be the value of the'--host' option.

--Host=HOST
specifies the system platform on which the software runs. If not specified, it will run `config.guess' to detect.

--Target=GARGET
specifies the system platform that the software is targeted to. This mainly works in the context of programming language tools such as compilers and assemblers. If not specified, the value of the'--host' option will be used by default.

--Disable-FEATURE
Some software packages can choose this option to provide compile-time configuration for large options, such as using the Kerberos authentication system or an experimental compiler optimal configuration. If these features are provided by default, you can use'--disable- FEATURE' to disable it, where'FEATURE' is the name of the feature. For example:

$ ./configure –disable-gui

-enable-FEATURE[=ARG] (System parameter configuration, completed at compile time)
On the contrary, some software packages may provide some features that are disabled by default, you can use'--enable-FEATURE' to enable it. Here's'FEATURE' Is the name of the feature. A feature may accept an optional parameter. For example:

$ ./configure –enable-buffers=128


`--enable-FEATURE=no' is synonymous with'--disable-FEATURE' mentioned above.

--With-PACKAGE[=ARG]
In the free software community, there is an excellent tradition of using existing packages and libraries. When using'configure' to configure a source tree, you can provide information about other installed packages. For example , Relying on Tcl and Tk's BLT device kit. To configure BLT, you may need to provide'configure' with some information about where we installed Tcl and Tk:

code show as below:

$ ./configure --with-tcl=/usr/local --with-tk=/usr/local
'--with-PACKAGE=no' is synonymous with'--without-PACKAGE' mentioned below.

--Without-PACKAGE
Sometimes you may not want your software
package to interact with the existing software packages on the system . For example, you may not want your new compiler to use GNU ld. You can do this by using this option:

$ ./configure –without-gnu-ld

--X-includes=DIR
This option is a special case of the'--with-PACKAGE' option. When Autoconf was first developed, it was popular to use'configure' as a workaround for Imake to make software that runs on X.'-- The'x-includes' option provides a way to specify the directory containing X11 header files to the'configure' script.


Similar to --x-libraries=DIR , the'--x-libraries' option provides a way to specify the directory containing the X11 library to the'configure' script.

 

It is recommended to use three trees: a source tree, a build tree, and an install tree.

An example is to use this method to build a GNU malloc package:

code show as below:

$ gtar zxf mmalloc-1.0.tar.gz
$ mkdir build && cd build
$ ../mmalloc-1.0/configure
creating cache ./config.cache
checking for gcc… gcc
checking whether the C compiler (gcc ) works… yes
checking whether the C compiler (gcc ) is a cross-compiler… no
checking whether we are using GNU C… yes
checking whether gcc accepts -g… yes
checking for a BSD compatible install… /usr/bin/install -c
checking host system type… i586-pc-linux-gnu
checking build system type… i586-pc-linux-gnu
checking for ar… ar
checking for ranlib… ranlib
checking how to run the C preprocessor… gcc -E
checking for unistd.h… yes
checking for getpagesize… yes
checking for working mmap… yes
checking for limits.h… yes
checking for stddef.h… yes
updating cache ../config.cache
creating ./config.status


In this way, the construction tree is configured, and you can continue to construct and install this package to the default location'/usr/local':

$ make all && make install

Guess you like

Origin blog.csdn.net/u014426028/article/details/110627851