How to compile a software for a non-typical platform?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to compile a software for a non-typical platform?
# 1  
Old 11-02-2015
How to compile a software for a non-typical platform?

I am quite new to compiling source codes in linux and have been running into a lot of problems in trying to do so since the platform configuration is different from most.

For starters, I know that you need to enter the following commands in order to install any software manually in linux:
Code:
./configure
make
make install

But I was never able to run all these three commands successfully. For a current problem of installing jabberd2, I run into ./configure problem of not being unable to find Libidn:
Code:
checking for Libidn version >= 0.3.0... no
configure: error: Libidn >= 0.3.0 not found

I verified via ipkg command that I do have Libidn version 1.25-1. I think it should be installed in either in /opt/bin or /opt/sbin. I looked through the help options in configure:
Code:
`configure' configures jabberd 2.3.4 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/jabberd]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build
  --enable-static[=PKGS]  build static libraries [default=no]
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-developer      Compile with warnings and debugging symbols
  --enable-debug          enable debug messages
  --enable-nad-debug      enable NAD pointer tracking
  --enable-pool-debug     enable memory pool statistics
  --enable-mio-debug      enable managed IO debug output
  --enable-ssl=DIR        enable SSL/TLS support (yes)
  --enable-mysql=DIR      enable MySQL auth/reg/storage support (no)
  --enable-pgsql=DIR      enable PostgreSQL auth/reg/storage support (no)
  --enable-sqlite         enable SQLite3 auth/reg/storage support (no)
  --enable-db             enable Berkeley DB auth/reg/storage support (no)
  --enable-oracle         enable Oracle auth/reg/storage support (no)
  --enable-ldap           enable OpenLDAP auth/reg support (no)
  --enable-pam            enable PAM auth/reg support (no)
  --enable-pipe           enable pipe auth/reg support (no)
  --enable-anon           enable anonymous auth/reg support (no)
  --enable-fs             enable filesystem storage support (no)
  --enable-websocket      enable WebSocket support on C2S port (no)
  --enable-mio=BACKENDS   use one of BACKENDS to drive MIO (select poll epoll
                          kqueue)
  --enable-superseded     enable superseded XEP support (yes)
  --enable-experimental   enable experimental features (yes)
  --enable-tests          enable tests (yes)
  --enable-werror         Treat all warnings as error

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                          both]
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-sysroot=DIR Search for dependent libraries within DIR
                        (or the compiler's sysroot if not specified).
  --with-extra-include-path
                          use additional include paths
  --with-extra-library-path
                          use additional library paths (remember to update
                          /etc/ld.so.conf too)
  --with-zlib=DIR         search for zlib in DIR
  --without-zlib          disable use of zlib
  --with-oracle-home=DIR  the Oracle home directory, for includes and libs
  --without-subst         disable use of substitution library

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  PKG_CONFIG  path to pkg-config utility
  PKG_CONFIG_PATH
              directories to add to pkg-config's search path
  PKG_CONFIG_LIBDIR
              path overriding pkg-config's built-in search path
  CHECK_CFLAGS
              C compiler flags for CHECK, overriding pkg-config
  CHECK_LIBS  linker flags for CHECK, overriding pkg-config

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Since I am not sure what I am doing is correct or not, I found that none of the following commands work:
Code:
./configure EPREFIX=/opt
./configure --exec-prefix=/opt
./configure PKG_CONFIG_PATH=/opt/bin

How am I supposed to configure ./configure for my platform?
# 2  
Old 11-02-2015
The software you're trying to build needs Libidn version >= 0.3.0 which presumably means a version 0.x.y where x >= 3 and y >= 0. A change in value in the 1st number in the version (0 to 1 in this case) indicates incompatible changes to the interfaces in the library that the code you're building is not prepared to handle.

You need to either get a newer version of the software you're building (that wants a Libidn version 1.x.y with x <= 25 or install an additional version of Libidn with version 0.x.y where x >= 3.

Note also that libraries should be loaded into a directory with a final component being lib; not bin.
# 3  
Old 11-07-2015
Quote:
You need to either get a newer version of the software you're building (that wants a Libidn version 1.x.y with x <= 25 or install an additional version of Libidn with version 0.x.y where x >= 3
None of the two choices is an option since the older version of Libidn (0.x) is not available for download and I am using the newest version of the software.

Fortunately, I was able to install alternative software using a different method that can substitute for it. But going back to the ./configure problem...if I enter the following command:
Code:
./configure --prefix=/opt

Doesn't that mean PREFIX is set to /opt? Then there won't be a need to set the following:
Code:
--includedir=/opt/include

Since includedir is PREFIX/include, which should yield /opt/include.

The strange part is when I enter a make command. I stumble upon a problem of unable to find a header file even through it is at /opt/include. What am I doing wrong?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Typical problem in UNIX

Input file I have a file with four fields. f1,f2,f3,f4 A,1,10,00,S B,2,20,00,00,D C,3,100,00,00,G I want Output like f1|f2|f3|f4 A|1|10,00|S B|2|20,00,00|D C|3|100,00,00|G please help on this (4 Replies)
Discussion started by: bharat1211
4 Replies

2. UNIX for Dummies Questions & Answers

Typical steps to be followed while applying an application patch upgrade on linux

what are the typical steps used by system adminstrators while applying an application patch upgrade (1 Reply)
Discussion started by: ramky79
1 Replies

3. Emergency UNIX and Linux Support

Calculating total space in GB for all files with typical pattern

Hi Experts, In a particular dir, I have many files *AJAY*. How can I get total size of all such files. I tried du -hs *AJAY* but it gave me individual size of all files. All I require is summation of all. Thanks, Ajay (4 Replies)
Discussion started by: ajaypatil_am
4 Replies

4. Shell Programming and Scripting

A typical array script

Hi All, I need to store the output of "find ." to an array one by one. Output of find . in my case will look like :- . ./one ./one/a ./one/b ./one/c ./two So my first array element should be "/one" and second one "/one/a" (need to remove "." from the output as well). Then I need to... (11 Replies)
Discussion started by: Renjesh
11 Replies

5. UNIX for Dummies Questions & Answers

Compiling gcc to compile make to compile yaboot

I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies

6. UNIX for Dummies Questions & Answers

Meaning and typical use of -3 signal in kill

Hi, What is the use of the signal -3 in kill command in unix? I read the meaning and typical use of this signal in one of the Oreilly books as below. Quit -- stop running (and dump core). Sent when you type CTRL-\. what does the CTRL-\ command do? Is it the combination of CTRL and... (6 Replies)
Discussion started by: venkatesht
6 Replies

7. Shell Programming and Scripting

typical mail script

hi i have a requirement to write a mail script which needs to be automated.There are 7 CSV files generated for 7 clients in a single day.Each file will contain one header and the name of the file follows a nomenclature like ABC_20080402_ClientID.csv.ClientID is lets say... (3 Replies)
Discussion started by: dr46014
3 Replies

8. Solaris

Typical way to disable a dameon

I want to disable some services starting automatically while system booting, for instance if i want to disable vold what i have to do ? i think some services related to a script init level shell directory,and i think as well that since solaris 10 they added a command to enable and disable services... (2 Replies)
Discussion started by: XP_2600
2 Replies
Login or Register to Ask a Question