Comments (17)
This is Sooo broken.
(gdb) run -f 2.conf
Starting program: apache2nginx -f 2.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
__strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:93
93 ../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
(gdb) bt
#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:93
#1 0x0000555555634a97 in apr_pstrdup (a=a@entry=0x5555556b1378,
s=0x556b1b38 <error: Cannot access memory at address 0x556b1b38>)
at strings/apr_strings.c:77
#2 0x0000555555639097 in apr_get_basedir (resolved_dir=0x7fffffffe0a0,
filename=, p=0x5555556b1378) at file_io/unix/filepath.c:349
#3 0x000055555558f417 in main (argc=, argv=)
at main.c:304
from apache2nginx.
+1 Running Mac OS X Mavericks. From what I have been reading. It would appear that the program has a bug in it. I had to compile and run it the my local hardware. I am unsure if my machine's hardware is the root of the issue or the source code itself.
from apache2nginx.
Ok. Upon further investigation I was able to get this tool to work. The caveat is that it has to run on a Ubuntu server or unix server. Even then I still have to compile from source and install it in /usr/local/apache2nginx
as per the project page documentation. As a Mac OS X user, without a Ubuntu server ready, I had to leverage a local virtual Ubuntu server via Vagrant to convert my apache configurations. I know this isn't a solution to the problem above, but an alternative for others who might land here.
tl;dr
- Use Vagrant to create an Ubuntu server.
- Sync your Apache confs that you want to convert onto that same server.
- Install apache2nginx via source (Main project page provides docs to do this).
- Use
apache2nginx
to convert your confs to be nginx compliant.
from apache2nginx.
Tried on a Majaro system and got a core dump. What does ubuntu have that is missing in manjaro?
from apache2nginx.
also getting segfault on ubuntu
from apache2nginx.
It indeed segfaults:
#0 0x00007fa44ab51676 in strlen () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x000055c4c2575a27 in apr_pstrdup (a=a@entry=0x55c4c4272128, s=0xffffffffc42728e8 <error: Cannot access memory at address 0xffffffffc42728e8>)
at strings/apr_strings.c:77
#2 0x000055c4c257a1e8 in apr_get_basedir (resolved_dir=0x7ffcf5f27ee0, filename=, p=0x55c4c4272128) at file_io/unix/filepath.c:349
#3 0x000055c4c24d1f5d in main (argc=, argv=) at main.c:304
from apache2nginx.
I have a fork that works, updated apr and included Reeds mods
https://github.com/gaby64/apache2nginx
from apache2nginx.
I have a fork that works, updated apr and included Reeds mods
@gaby64 even using your repo, I kept getting libtool generated with CRLF issues (^M).
Running a recursive dos2unix -f
got me a fixed libtool, and consequently a proper configure
stage.
However, the end result is a compiled and working binary. Thanks!
from apache2nginx.
I have a fork that works, updated apr and included Reeds mods
@gaby64 even using your repo, I kept getting libtool generated with CRLF issues (^M).
Running a recursivedos2unix -f
got me a fixed libtool, and consequently a properconfigure
stage.However, the end result is a compiled and working binary. Thanks!
that might be an issue with your git config, I cloned my repo an had no issue on Ubuntu 18.10
running file -- *
shows no file with crlf endings
from apache2nginx.
Was wishing this would work, tried everything that was commented here, was able to compile and run on ubuntu, but also got Seg Fault.
Might need to write my own in java, stay tuned.
from apache2nginx.
I have a fork that works, updated apr and included Reeds mods
Hi gaby64 -- How can I build your solution? The READ.ME file on your fork is identical to the original -- so the the same files will be compiled.
Thank you
from apache2nginx.
download source files from my fork
./configure
make && make install
from apache2nginx.
download source files from my fork
./configure
make && make install
Thank you for the help .. making progress -- I am now getting the error message
bin/bash /tmp/apache2nginx/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/tmp/apache2nginx/srclib/apr-util/include -I/tmp/apache2nginx/srclib/apr-util/include/private -I/tmp/apache2nginx/srclib/apr/include -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:10: fatal error: expat.h: No such file or directory
#include <expat.h>
^~~~~~~~~
compilation terminated.
from apache2nginx.
run buildconf
from apache2nginx.
run buildconf
Okay .. I had to install libtool and buildconf ran without errors .. then I did
./configure
make && make install
resulting in this error
/bin/bash /tmp/apache2nginx/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/tmp/apache2nginx/srclib/apr-util/include -I/tmp/apache2nginx/srclib/apr-util/include/private -I/tmp/apache2nginx/srclib/apr/include -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:10: fatal error: expat.h: No such file or directory
#include <expat.h>
^~~~~~~~~
compilation terminated.
/tmp/apache2nginx/srclib/apr-util/build/rules.mk:206: recipe for target 'xml/apr_xml.lo' failed
make[3]: *** [xml/apr_xml.lo] Error 1
make[3]: Leaving directory '/tmp/apache2nginx/srclib/apr-util'
/tmp/apache2nginx/srclib/apr-util/build/rules.mk:118: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/tmp/apache2nginx/srclib/apr-util'
/tmp/apache2nginx/build/rules.mk:72: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/apache2nginx/srclib'
/tmp/apache2nginx/build/rules.mk:72: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
from apache2nginx.
install expat lib or package for your distro
please do the research, I only intended to provide patched code that worked for me, not compile support. it may not even work anymore, I could check tomorrow.
from apache2nginx.
from apache2nginx.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apache2nginx.