Ad Widget

Collapse

Compiling from source - Configure Options

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kayjay
    Member
    • Jun 2010
    • 43

    #1

    Compiling from source - Configure Options

    I have been using the pre-built packages for Debian Wheezy in recent deployments, it does make life simpler. It would be extremely useful if the configure options that were used to generate the binary's were published/documented somewhere (maybe they are?). This would make it easy should minor code tweak or patch be required. I can easily drop in the replacement without the worry that I may not have options quite as the were before.

    Thanks
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by kayjay
    I have been using the pre-built packages for Debian Wheezy in recent deployments, it does make life simpler. It would be extremely useful if the configure options that were used to generate the binary's were published/documented somewhere (maybe they are?). This would make it easy should minor code tweak or patch be required. I can easily drop in the replacement without the worry that I may not have options quite as the were before.

    Thanks
    Zabbix uses standard automake/autoconfig/libtool tools.
    I really don't understand why you want to document "./configure --help" output which is self explanatory.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • kayjay
      Member
      • Jun 2010
      • 43

      #3
      1) Because I don't find that the --help is explicit enough in some respects
      2) It removes any doubt

      Thanks

      Comment

      • kloczek
        Senior Member
        • Jun 2006
        • 1771

        #4
        Originally posted by kayjay
        1) Because I don't find that the --help is explicit enough in some respects
        2) It removes any doubt

        Thanks
        What kind of doubt?
        Don't get me wrong but I really have no idea what kind of doubts you may have after read "./configure --help" output.
        Did you had a look on spec file used on building rpm packages or all files used on build Debian packages?
        Last edited by kloczek; 14-10-2014, 18:27.
        http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
        https://kloczek.wordpress.com/
        zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
        My zabbix templates https://github.com/kloczek/zabbix-templates

        Comment

        • kayjay
          Member
          • Jun 2010
          • 43

          #5
          For example:
          How to set the default location for zabbix_server.conf

          Thanks

          Comment

          • kloczek
            Senior Member
            • Jun 2006
            • 1771

            #6
            Originally posted by kayjay
            For example:
            How to set the default location for zabbix_server.conf
            As the same as in every other source code tree which is using autoconf/automake all configuration files should be using path path passed in --sysconfdir.
            I wrote you that you should have look on spec file which you can find in zabbix src.rpm package to study description of build process described in rpm spec file.
            If you will have look on such file in %build section you can find using %configure macro which is unrolled to:
            Code:
            $ rpm --eval '%configure'
            
              CFLAGS="${CFLAGS:--O2 -g}" ; export CFLAGS ; 
              CXXFLAGS="${CXXFLAGS:--O2 -g}" ; export CXXFLAGS ; 
              FFLAGS="${FFLAGS:--O2 -g}" ; export FFLAGS ; 
              ./configure --host=x86_64-redhat-linux-gnu --build=x86_64-redhat-linux-gnu \
                    --program-prefix= \
                    --prefix=/usr \
                    --exec-prefix=/usr \
                    --bindir=/usr/bin \
                    --sbindir=/usr/sbin \
                    --sysconfdir=/etc \
                    --datadir=/usr/share \
                    --includedir=/usr/include \
                    --libdir=/usr/lib64 \
                    --libexecdir=/usr/libexec \
                    --localstatedir=/var \
                    --sharedstatedir=/var/lib \
                    --mandir=/usr/share/man \
                    --infodir=/usr/share/info
            Usually zabbix.spec files which you can find in publicly available source packages contains line like:
            Code:
            %define         _sysconfdir     /etc/%{name}
            which relocates in case %_sysconfdir to /etc/zabbix.
            %_sysconfdir macro is used in %configure macro definition in line with --sysconfdir=<path>

            If you are learning how to build something from source code you should start from build descriptions used on building rpm/deb/IPS packages.
            If you don't have enough skills about such processes do not try to use results of you work on production because with 100% certainly you will do more harm than good. Instead try to use binary packages. Good point to start learning how to build Something(tm) from source tree is study packages building descriptions. When you will understand what zabbix.spec file describes you can try to do something to fulfill you own needs

            And trust me .. anyone who knows enough about building packages if will spot that some source tree build automation uses GNU auto tools really does not need any other documentation about how to build some project

            Try to read autoconf, automake info pages.

            PS. You don't have doubts .. it is noting more than plain lack of some skills. With enough time and determination you can fill this "gap" :P
            Last edited by kloczek; 15-10-2014, 18:44.
            http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
            https://kloczek.wordpress.com/
            zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
            My zabbix templates https://github.com/kloczek/zabbix-templates

            Comment

            Working...