How to create *.tar.gz to install free software from C/C++ code
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to create *.tar.gz to install free software from C/C++ code
Hi everybody !
I have just written a simple program to Merge & Split file run in terminal. It very cool and easy to use so I want make a file *.tar.gz to share for my friends for free under GPL license and they can install with the command:
Quote:
$ ./configure
$ make
$ make install
My computer use Fedora17-i686-KDE, Kernel Linux 3.4.6-2
I use GNU autotool and installed autotoolset-0.11.3-1.i386.rpm, autoconf, automake, libtool and use acmkdir to create a standard install package but it not run.
And I know If add option -D_FILE_OFFSET_BITS=64 at option for gcc look like: $ gcc -D_FILE_OFSET_BITS=64 *.c *.h -o MSF
I will handle lager file upto 2GB but when auto compile at destination computer how I do it.
Please help me, thank so much !
My code include 7 files:
Quote:
MSF.c -It contains main() method
agent.h -It assigns all struct enum and some method for split and merge file
agent.c -It contains full method in agent.h
split.h -It assigns Split() method
split.c -It contains full method in split.h
merge.h -It assigns Merge() method
merge.c -It contains full method in merge.h
- aclocal.
/usr/share/aclocal/lf_x11.m4:33: warning: underquoted definition of LF_PATH_XLIB
/usr/share/aclocal/lf_x11.m4:33: run info '(automake)Extending aclocal'
/usr/share/aclocal/lf_x11.m4:33: or see http://www.gnu.org/software/automake...ending-aclocal
configure.ac:16: warning: AC_REQUIRE: `AC_PROG_CC' was expanded before it was required
../../lib/autoconf/c.m4:429: AC_LANG_COMPILER(C) is expanded from...
../../lib/autoconf/lang.m4:330: AC_LANG_COMPILER_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/m4sugar/m4sh.m4:353: AS_REQUIRE is expanded from...
../../lib/autoconf/general.m4:183: AC_REQUIRE_SHELL_FN is expanded from...
../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from...
../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from...
../../lib/autoconf/specific.m4:432: AC_AIX is expanded from...
/usr/share/aclocal/lf_cc.m4:33: LF_CONFIGURE_CC is expanded from...
configure.ac:16: the top level
configure.ac:16: warning: AC_REQUIRE: `AC_PROG_CPP' was expanded before it was required
../../lib/autoconf/c.m4:336: AC_LANG_PREPROC(C) is expanded from...
../../lib/autoconf/lang.m4:373: AC_LANG_PREPROC_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2519: AC_PREPROC_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/m4sugar/m4sh.m4:353: AS_REQUIRE is expanded from...
../../lib/autoconf/general.m4:183: AC_REQUIRE_SHELL_FN is expanded from...
../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from...
../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from...
../../lib/autoconf/specific.m4:432: AC_AIX is expanded from...
/usr/share/aclocal/lf_cc.m4:33: LF_CONFIGURE_CC is expanded from...
configure.ac:16: the top level
configure.ac:17: warning: AC_REQUIRE: `AC_PROG_CXX' was expanded before it was required
../../lib/autoconf/c.m4:667: AC_LANG_COMPILER(C++) is expanded from...
../../lib/autoconf/lang.m4:330: AC_LANG_COMPILER_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2749: AC_RUN_IFELSE is expanded from...
../../lib/autoconf/general.m4:2765: AC_TRY_RUN is expanded from...
/usr/share/aclocal/lf_cxx.m4:55: LF_CPP_PORTABILITY is expanded from...
/usr/share/aclocal/lf_cxx.m4:32: LF_CONFIGURE_CXX is expanded from...
configure.ac:17: the top level
- autoconf.
configure.ac:16: warning: AC_REQUIRE: `AC_PROG_CC' was expanded before it was required
../../lib/autoconf/c.m4:429: AC_LANG_COMPILER(C) is expanded from...
../../lib/autoconf/lang.m4:330: AC_LANG_COMPILER_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/m4sugar/m4sh.m4:353: AS_REQUIRE is expanded from...
../../lib/autoconf/general.m4:183: AC_REQUIRE_SHELL_FN is expanded from...
../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from...
../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from...
../../lib/autoconf/specific.m4:432: AC_AIX is expanded from...
aclocal.m4:55: LF_CONFIGURE_CC is expanded from...
configure.ac:16: the top level
configure.ac:16: warning: AC_REQUIRE: `AC_PROG_CPP' was expanded before it was required
../../lib/autoconf/c.m4:336: AC_LANG_PREPROC(C) is expanded from...
../../lib/autoconf/lang.m4:373: AC_LANG_PREPROC_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2519: AC_PREPROC_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/m4sugar/m4sh.m4:353: AS_REQUIRE is expanded from...
../../lib/autoconf/general.m4:183: AC_REQUIRE_SHELL_FN is expanded from...
../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from...
../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from...
../../lib/autoconf/specific.m4:432: AC_AIX is expanded from...
aclocal.m4:55: LF_CONFIGURE_CC is expanded from...
configure.ac:16: the top level
configure.ac:17: warning: AC_REQUIRE: `AC_PROG_CXX' was expanded before it was required
../../lib/autoconf/c.m4:667: AC_LANG_COMPILER(C++) is expanded from...
../../lib/autoconf/lang.m4:330: AC_LANG_COMPILER_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2749: AC_RUN_IFELSE is expanded from...
../../lib/autoconf/general.m4:2765: AC_TRY_RUN is expanded from...
aclocal.m4:120: LF_CPP_PORTABILITY is expanded from...
aclocal.m4:97: LF_CONFIGURE_CXX is expanded from...
configure.ac:17: the top level
- acconfig.
Use of "do" to call subroutines is deprecated at /usr/bin/acconfig line 85.
Use of "do" to call subroutines is deprecated at /usr/bin/acconfig line 90.
Use of "do" to call subroutines is deprecated at /usr/bin/acconfig line 91.
Use of "do" to call subroutines is deprecated at /usr/bin/acconfig line 93.
Can't open configure.in: No such file or directory at /usr/bin/acconfig line 102.
- autoheader.
configure.ac:16: warning: AC_REQUIRE: `AC_PROG_CC' was expanded before it was required
../../lib/autoconf/c.m4:429: AC_LANG_COMPILER(C) is expanded from...
../../lib/autoconf/lang.m4:330: AC_LANG_COMPILER_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/m4sugar/m4sh.m4:353: AS_REQUIRE is expanded from...
../../lib/autoconf/general.m4:183: AC_REQUIRE_SHELL_FN is expanded from...
../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from...
../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from...
../../lib/autoconf/specific.m4:432: AC_AIX is expanded from...
aclocal.m4:55: LF_CONFIGURE_CC is expanded from...
configure.ac:16: the top level
configure.ac:16: warning: AC_REQUIRE: `AC_PROG_CPP' was expanded before it was required
../../lib/autoconf/c.m4:336: AC_LANG_PREPROC(C) is expanded from...
../../lib/autoconf/lang.m4:373: AC_LANG_PREPROC_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2519: AC_PREPROC_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/m4sugar/m4sh.m4:353: AS_REQUIRE is expanded from...
../../lib/autoconf/general.m4:183: AC_REQUIRE_SHELL_FN is expanded from...
../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from...
../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from...
../../lib/autoconf/specific.m4:432: AC_AIX is expanded from...
aclocal.m4:55: LF_CONFIGURE_CC is expanded from...
configure.ac:16: the top level
configure.ac:17: warning: AC_REQUIRE: `AC_PROG_CXX' was expanded before it was required
../../lib/autoconf/c.m4:667: AC_LANG_COMPILER(C++) is expanded from...
../../lib/autoconf/lang.m4:330: AC_LANG_COMPILER_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2749: AC_RUN_IFELSE is expanded from...
../../lib/autoconf/general.m4:2765: AC_TRY_RUN is expanded from...
aclocal.m4:120: LF_CPP_PORTABILITY is expanded from...
aclocal.m4:97: LF_CONFIGURE_CXX is expanded from...
configure.ac:17: the top level
autoheader: warning: missing template: CXX_HAS_BUGGY_FOR_LOOPS
autoheader: Use AC_DEFINE([CXX_HAS_BUGGY_FOR_LOOPS], [], [Description])
autoheader: warning: missing template: CXX_HAS_NO_BOOL
autoheader: warning: missing template: NDEBUG
autoheader: warning: missing template: YOUR_OS
- automake.
configure.ac:16: warning: AC_REQUIRE: `AC_PROG_CC' was expanded before it was required
../../lib/autoconf/c.m4:429: AC_LANG_COMPILER(C) is expanded from...
../../lib/autoconf/lang.m4:330: AC_LANG_COMPILER_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2607: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/m4sugar/m4sh.m4:353: AS_REQUIRE is expanded from...
../../lib/autoconf/general.m4:183: AC_REQUIRE_SHELL_FN is expanded from...
../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from...
../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from...
../../lib/autoconf/specific.m4:432: AC_AIX is expanded from...
aclocal.m4:55: LF_CONFIGURE_CC is expanded from...
configure.ac:16: the top level
configure.ac:16: warning: AC_REQUIRE: `AC_PROG_CPP' was expanded before it was required
../../lib/autoconf/c.m4:336: AC_LANG_PREPROC(C) is expanded from...
../../lib/autoconf/lang.m4:373: AC_LANG_PREPROC_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2519: AC_PREPROC_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/m4sugar/m4sh.m4:353: AS_REQUIRE is expanded from...
../../lib/autoconf/general.m4:183: AC_REQUIRE_SHELL_FN is expanded from...
../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from...
../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from...
../../lib/autoconf/specific.m4:432: AC_AIX is expanded from...
aclocal.m4:55: LF_CONFIGURE_CC is expanded from...
configure.ac:16: the top level
configure.ac:17: warning: AC_REQUIRE: `AC_PROG_CXX' was expanded before it was required
../../lib/autoconf/c.m4:667: AC_LANG_COMPILER(C++) is expanded from...
../../lib/autoconf/lang.m4:330: AC_LANG_COMPILER_REQUIRE is expanded from...
../../lib/autoconf/general.m4:2749: AC_RUN_IFELSE is expanded from...
../../lib/autoconf/general.m4:2765: AC_TRY_RUN is expanded from...
aclocal.m4:120: LF_CPP_PORTABILITY is expanded from...
aclocal.m4:97: LF_CONFIGURE_CXX is expanded from...
configure.ac:17: the top level
configure.ac:12: required directory ./config does not exist
configure.ac:18: installing `config/config.guess'; error while making link: No such file or directory
configure.ac:18: installing `config/config.sub'; error while making link: No such file or directory
configure.ac:14: installing `config/install-sh'; error while making link: No such file or directory
configure.ac:14: installing `config/missing'; error while making link: No such file or directory
src/Makefile.am: installing `config/depcomp'; error while making link: No such file or directory
Makefile.am: required file `./README' not found
configure.ac:13: required file `config.h.in' not found
Last edited by greendream; 08-04-2012 at 10:51 AM.
As far as I know autoconf/automake/configure is far beyond human understanding... For your project a well-written Makefile would be suffice, especially if you comment carefully the places where to end-user could/should make their system-dependent modifications.
This macro is a platform-specific subset of AC_USE_SYSTEM_EXTENSIONS (see AC_USE_SYSTEM_EXTENSIONS).
...
— Macro: AC_ISC_POSIX
This macro adds -lcposix to output variable LIBS if necessary for Posix facilities. Sun dropped support for the obsolete INTERACTIVE Systems Corporation Unix on 2006-07-23. New programs need not use this macro. It is implemented as AC_SEARCH_LIBS([strerror], [cposix]) (see AC_SEARCH_LIBS).
...
— Macro: AC_MINIX
This macro is a platform-specific subset of AC_USE_SYSTEM_EXTENSIONS (see AC_USE_SYSTEM_EXTENSIONS).
Quote:
Originally Posted by NevemTeve
As far as I know autoconf/automake/configure is far beyond human understanding...
I woudn't go that far, but it is overkill for something you just want to share with your friends (assuming your friends are not running some obscure UNIX variant).
Quote:
Originally Posted by greendream
$ ./configure
$ make
$ make install
Oh, and please don't use orange, it's really hard to read. Actually, please avoid all colours and prefer [code][/code] to [quote][/quote] when posting code.
As far as I know autoconf/automake/configure is far beyond human understanding... For your project a well-written Makefile would be suffice, especially if you comment carefully the places where to end-user could/should make their system-dependent modifications.
Thank guy, I'm newbie, maybe I not enough experience to show problem. You can show me I need give for everybody clues or info to get the best solve for my problem.
ntubski
Oh, and please don't use orange, it's really hard to read. Actually, please avoid all colours and prefer [code][/code] to when posting code.
Thank I have just fixed it.
Quote:
ntubski
I woudn't go that far, but it is overkill for something you just want to share with your friends (assuming your friends are not running some obscure UNIX variant).
Maybe that, but I want join FSF to study and lear, maybe one day I can contribute for community one good software but I don't know how to make an install package, that crazy
I want study step by step, maybe it hard at the first time but I never give up !
Somebody can, please show me step by step.
Thank so much !
Last edited by greendream; 08-04-2012 at 08:48 PM.
Well I think the first step would be to create a plain Makefile for your software. automake just uses some macro expansions to write a Makefile, so to use it properly you need a good understanding of Makefiles. Start with the GNU Make manual, if you get stuck let us know.
I agree with ntubski. For now, focus on the actual application, and allow the autotools stuff to absorb by osmosis as you develop this and other packages. For a simple application that doesn't do anything exotic and isn't target host dependent, an adequately commented Makefile is just fine. There is great value in learning about make, a lot less value in knowing autotools, IMHO.
--- rod
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.