-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New build system #50
New build system #50
Conversation
Tweaking files on a github and in a source tar file Signed-off-by: Akira Tsukamoto <[email protected]>
rtpdump.c never user the declared fmod() and nothing uses the declared infinity()
This makes './compile; make' build rtptools without GNU and without autoregenerating anything. The ./configure script is a simple, hand-written, standalone shell script accompanied with a set of trivial have-*.c check programs and compat-*.c implementations. Currently, we only check for err() and strtonum(), and whether struct msghdr has msg_control; this is a proof of concept - we need to go through the old configure.ac and Makefile.am and trhrough all the sources to make sure nothing is left behind. The idea of replacing the GNU autohell with this comes from http://mandoc.bsd.lv/cgi-bin/cvsweb/INSTALL
THese are the remaining system functions etc that we need to check for with have-*.c and set in config.h
Signed-off-by: Akira Tsukamoto <[email protected]>
remove and ignore regenerated files
Signed-off-by: Akira Tsukamoto <[email protected]>
drop unused <math.h>
Signed-off-by: Akira Tsukamoto <[email protected]>
This is the shell code that runs the test in the proposed
|
There are several topics need to be discussed for this pull request. Having a script for generating Makefile for different system will make everybody easier to run the rtptools on different platform. The release 1.22 is using autotols, just because I wanted to minimize the breakage and I was trying to be conservative when fixing the build adopting to circumstance from the older releases. When @janstary was referring the new build system, I thought he was going to use cmake, waf or etc which already exists. Then I saw it was brand new configure script written from scratch. :) As @janakj mentioned, considering the size of rtptools, the auotools is overkill. $ ./configure --host=arm-linux-gnueabihf With It looks like just changing the compiler in the CC which might not be so difficult to adapt on new configure script. Other topics here is that license of autotools which is GPL. There is no problem in point of license that autotools is being GPL for OpenBSD. The autotools generates I understand that FreeBSD and OpenBSD project are going away from GPL programs, and replacing glibc, gcc and others. |
The build system should be a thin layer upon the actual code. The build system introduced here is not new and is not my invention; Regarding cross-compiling: it is the compiler's job to produce code for the given platform. Regarding license: what I mean by acceptable license in #51 In autotools (as I understand it), autoconf produces I find that quite overingeneered. In the proposed system, you have a static |
Regarding cross-compilation: I don't know if you need it. It was my impression that you care about supporting multiple operating systems and platforms. If that's the case, providing support for cross-compilation would make sense. It's not that difficult to do in a small project like rtptools, one just needs to keep in mind that programs may need to be compiled and run in the configuration phase. In my opinion, having cross-compilation support is useful, because it helps build the software for various embedded platforms, e.g., those based ARM SoCs or Android. I hear those are popular these days. |
Supporting multiple operating systems and platforms is definitely the goal, |
So what happens now? Do we want this? |
README.md
Outdated
are now reasonably close to POSIX and do not need arcane shell magic | ||
any longer. If your system does need such magic, consider upgrading | ||
to reasonably modern POSIX-compliant tools rather than asking for | ||
autoconf-style workarounds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't like autotools and that's fine. But is this text really necessary? README.md is one of the first files a new user encounters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no objections to removing this. I felt it appropriate to inform the user
that the ./configure
script is not what he might be expecting from elsewhere.
I will remove it.
rtpdump.o: rtpdump.c rtp.h sysdep.h vat.h rtpdump.h ansi.h | ||
rtpplay.o: rtpplay.c sysdep.h notify.h rtp.h rtpdump.h multimer.h ansi.h | ||
rtpsend.o: rtpsend.c notify.h rtp.h sysdep.h multimer.h ansi.h | ||
rtptrans.o: rtptrans.c rtp.h sysdep.h rtpdump.h ansi.h notify.h multimer.h vat.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that the list of compile-time dependencies is fixed? Are developers expected to keep this file synchronized with the source code?
Wouldn't it be better and more robust to let the compiler (gcc) generate the list of dependencies automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list is generated by mkdep
. It has not changed in a decade,
and can be redone with make depend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I think make depend is fine (as long as there is one command to update the dependency list).
README.md
Outdated
|
||
### build | ||
|
||
Once the source is configured as above, run `make` to build SoX. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SoX -> rtptools?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copypasta - fixed, thanks.
have-gethostbyname.c
Outdated
main(void) | ||
{ | ||
struct hostent* host; | ||
host = gethostbyname("columbia.edu"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a good idea to invoke a function that internally performs a DNS request? Would it not be possible to test for the presence of gethostbyname without invoking it (and waiting for the DNS response to arrive or timeout)?
If gethostbyname needs to be invoked, perhaps the test could pass an IPv4 address to it, e.g., "127.0.0.1", or a name that is unlikely to trigger name resolution such as "localhost".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, localhost
is probably better. Thanks.
Thanks for clarification of your intention regarding the license and the I think we could close of having consensus on the license topics. |
For the cross-compilation, almost nobody likes cross-compilation for the developing products. We have to adopt world if we do not have the alternative and we can not fix the world. I feel it is OK to add cross-compiling feature after merging the new configure script. |
I don't think the cross-compiling arguments above apply to our case. On my Beagle Bone Black running OpenBSD 6.3/armv7, The arm* boards are pretty well supported nowadays, I don't think cross-compilation is worth the added complexity. I agree that both this and the rpm (and possibly deb) packages So, is there anything stopping us from merging? |
BTW, the old With this new system, (Note how the new |
How about the other reason I mentioned? Please try to build natively on any of the HP/Lexmark printers. Software engineering is normally a team work. |
We already agreed to merge this. Can you please merge this? If you need to run rtptools on a Lexmark printer, |
Ok :)
Lets not go on this road any further. |
This gets rid of GNU autotools and introduces a simple, hand-written
./configure
that uses a set of trivial
have-*.c
programs to test whether e.g.err()
exists,or whether
socket()
needs-lsocket
, etc. See the README.