Skip to content
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

Compile Failure on Alpine #22

Closed
strikerx22 opened this issue Nov 15, 2022 · 4 comments
Closed

Compile Failure on Alpine #22

strikerx22 opened this issue Nov 15, 2022 · 4 comments

Comments

@strikerx22
Copy link
Contributor

strikerx22 commented Nov 15, 2022

Having issues with a simple "make" of the application on multiple Docker distro images. Both Ubuntu and Alpine are reporting errors with line 407 of 'Makefile.inc'

099047d7298d:/event-driven-servers# ./configure tac_plus-ng

The file

    build/Makefile.inc.linux-3.10.0-1160.66.1.el7.x86_64-x86_64

was just created. You may run "make" now. After that, you may wish to do a
"make install". Alternatively, you'll find the compiled binaries (plus some
ancillary scripts) in the

    build/linux-3.10.0-1160.66.1.el7.x86_64-x86_64/fakeroot/

directory structure. It's probably advisable to have a look there in any case,
as you may or may not like the particular file system layout, and this will
give you a chance to see it before installing.

Please direct support requests to the "Event-Driven Servers" Google Group at

    event-driven-servers@googlegroups.com
    https://groups.google.com/group/event-driven-servers

or file an issue at

    https://github.com/MarcJHuber/event-driven-servers

if you need help.

Support requests sent to the author's private email address may be silently
ignored.

099047d7298d:/event-driven-servers# 

099047d7298d:/event-driven-servers# make
sh: invalid number '3]10]0]1160]66]1]]]7]]86]64]'
sh: invalid number ''
sh: invalid number ''
Makefile.inc:407: *** invalid syntax in conditional.  Stop.
099047d7298d:/event-driven-servers# 

I feel like it's likely something as simple as a missing package but I can't find any comprehensive list of what's required. In my attempts to get a successful compile, here's the list of packages I have thus far:

    apk add build-base bzip2 perl perl-digest-md5 perl-ldap perl-io-socket-ssl bash git clang gcc flex bison pcre pcre2 && \
    apk add zlib curl make perl-regexp-tr

@MarcJHuber
Copy link
Owner

Hi,

I'm sorry, I don't think I can help you with this.

I just gave up installing Alpine (didn't get DNS resolution to work, at al), and while I realize that virtually everybody uses it in containers (which kind-of implies that it's great) I'm not going to spent more time on this.

I assume that you're seeing a BusyBox issue. As the errors your seeing look shell related you could try "grep shell Makefile.inc" and check whether one of those returns unexpected results. Plus, you could add additional $(warning ...) statements to determine where the error actually occurs.

If there's any trivial step-by-step method to replicate that issue I'm happy to try again.

Thanks,

Marc

@strikerx22
Copy link
Contributor Author

strikerx22 commented Nov 17, 2022

Thanks for the reply, Marc! I'm actually becoming less and less convinced that this is an Alpine-specific issue. I cannot compile on Ubuntu or CentOS, either.

For your reference and simplicity, here's a super quick and easy way to replicate the failure and to test compile as you're programming. If you don't want the container to be deleted upon exit, just remove the --rm flag.

# Launch self-destructing Alpine container with Shell and install packages
docker run --rm -i -t alpine /bin/sh --login
apk update
apk add build-base bzip2 perl perl-digest-md5 perl-ldap perl-io-socket-ssl bash git clang gcc flex bison pcre pcre2 zlib curl make perl-regexp-tr

# Clone Git Repo then attempt to compile
git clone https://github.com/MarcJHuber/event-driven-servers.git
cd event-driven-servers
env SHELL=/bin/bash ./configure tac_plus-ng
env SHELL=/bin/bash make
env SHELL=/bin/bash make install

If you want to recreate the failure of the Makefile on CentOS, here's a the steps to replicate

# Launch self-destructing CentOS container with Bash Shell and install packages
docker run --rm -i -t centos:7 /bin/bash --login
yum update -y
yum install -y gcc make cmake perl llvm git clang cpan
yum install -y perl-Digest-SHA perl-Digest-MD5 perl-Socket perl-IO-Socket-SSL perl-LDAP

# Clone Repo then attempt to compile
git clone https://github.com/MarcJHuber/event-driven-servers.git

cd event-driven-servers/

./configure tac_plus-ng
make

You should see that as of right now, both instances get stuck on Makefile.inc, line 407 due to the following error (the below output is from the CentOS 7 container

[root@70d7e238fc5a event-driven-servers]# make
Makefile.inc:407: *** invalid syntax in conditional.  Stop.
[root@70d7e238fc5a event-driven-servers]# 
[root@70d7e238fc5a event-driven-servers]# 

@strikerx22
Copy link
Contributor Author

One last thing to help, Marc, is that I've confirmed this was broken somewhere between October 31st and now. If we clone https://github.com/dewebdes/event-driven-servers (a fork of your repo from Oct 31st), then the compile works as expected.

To replicate the compile failure:

# Launch self-destructing CentOS container with Bash Shell and install packages
docker run --rm -i -t centos:7 /bin/bash --login
yum update -y
yum install -y gcc make cmake perl llvm git clang cpan
yum install -y perl-Digest-SHA perl-Digest-MD5 perl-Socket perl-IO-Socket-SSL perl-LDAP

# Clone Repo then attempt to compile
git clone https://github.com/MarcJHuber/event-driven-servers.git
cd event-driven-servers/
./configure tac_plus-ng
make

To replicate the successful compile:

# Launch self-destructing CentOS container with Bash Shell and install packages
docker run --rm -i -t centos:7 /bin/bash --login
yum update -y
yum install -y gcc make cmake perl llvm git clang cpan
yum install -y perl-Digest-SHA perl-Digest-MD5 perl-Socket perl-IO-Socket-SSL perl-LDAP

# Clone Repo then attempt to compile
git clone https://github.com/dewebdes/event-driven-servers.git
cd event-driven-servers/
./configure tac_plus-ng
make
make install

Hope this helps!

@MarcJHuber
Copy link
Owner

Hi,

thanks, a closing right bracket is missing in line 407. I'll push a fix shortly.

Thanks a lot for your support in finding this!

Cheers,

Marc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants