Giter VIP home page Giter VIP logo

Comments (14)

nigelhorne avatar nigelhorne commented on May 30, 2024 1

Works - thanks!

from tcptunnel.

vakuum avatar vakuum commented on May 30, 2024

Which version of sed are you using?

$ sed --version
sed (GNU sed) 4.2.2
Copyright (C) 2012 Free Software Foundation, Inc.
...

from tcptunnel.

nigelhorne avatar nigelhorne commented on May 30, 2024

4.2.1

from tcptunnel.

vakuum avatar vakuum commented on May 30, 2024

I can't reproduce it with sed 4.2.1.

I used the following steps to install sed 4.2.1 separately under /tmp/sed-4.2.1:

$ mkdir /tmp/src

$ cd /tmp/src

$ wget https://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.bz2

$ tar -jxvf sed-4.2.1.tar.bz2

$ cd sed-4.2.1

$ ./configure --prefix=/tmp/sed-4.2.1

$ make

$ make install

$ export PATH=/tmp/sed-4.2.1/bin:$PATH

$ which sed
/tmp/sed-4.2.1/bin/sed

$ sed --version
GNU sed version 4.2.1
...

$ cd /tmp/src

$ git clone https://github.com/vakuum/tcptunnel.git

$ cd tcptunnel

$ ./configure 
checking host system type... Linux
configure: configure complete, now type 'make' and 'make install'.

Do you still get the error with the steps above?

from tcptunnel.

nigelhorne avatar nigelhorne commented on May 30, 2024

Sorry, but that didn't work for me:

[ps395777]$ ./configure --prefix=/tmp/sed-4.2.1
-bash: ./configure: Permission denied
[ps395777]$ bash ./configure --prefix=/tmp/sed-4.2.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in
/tmp/src/sed-4.2.1': configure: error: cannot run C compiled programs. If you meant to cross compile, use--host'.
See `config.log' for more details.

from tcptunnel.

vakuum avatar vakuum commented on May 30, 2024

Now we have two problems. :-)

Your /tmp partition seems to be mounted with the noexec flag.

So let's try it with $HOME instead of /tmp:

$ mkdir -p "$HOME/tmp/src"

$ cd "$HOME/tmp/src"

$ wget https://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.bz2

$ tar -jxvf sed-4.2.1.tar.bz2

$ cd sed-4.2.1

$ ./configure --prefix="$HOME/tmp/sed-4.2.1"

$ make

$ make install

$ export PATH="$HOME/tmp/sed-4.2.1/bin":$PATH

$ which sed
/home/clemens/tmp/sed-4.2.1/bin/sed

$ sed --version
GNU sed version 4.2.1
...

$ cd "$HOME/tmp/src"

$ git clone https://github.com/vakuum/tcptunnel.git

$ cd tcptunnel

$ ./configure 
checking host system type... Linux
configure: configure complete, now type 'make' and 'make install'.

from tcptunnel.

vakuum avatar vakuum commented on May 30, 2024

@nigelhorne: Are you still trying to make it work?

from tcptunnel.

nigelhorne avatar nigelhorne commented on May 30, 2024

Not forgotten about this - just been busy. Hold on :-)

from tcptunnel.

nigelhorne avatar nigelhorne commented on May 30, 2024

Still fails:

...
[ps395777]$ export PATH=`pwd`/bin:$PATH
[ps395777]$ which sed
/home/hornenj/src/sed-4.2.1/bin/sed
[ps395777]$ sed --version
GNU sed version 4.2.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
E-mail bug reports to: <[email protected]>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
[ps395777]$ pwd
/home/hornenj/src/sed-4.2.1
[ps395777]$ cd ..
[ps395777]$ mkdir foo
[ps395777]$ cd foo
[ps395777]$ git clone https://github.com/vakuum/tcptunnel.git
Cloning into 'tcptunnel'...
remote: Counting objects: 204, done.
remote: Total 204 (delta 0), reused 0 (delta 0), pack-reused 204
Receiving objects: 100% (204/204), 37.15 KiB | 0 bytes/s, done.
Resolving deltas: 100% (105/105), done.
Checking connectivity... done.
[ps395777]$ cd tcptunnel/
[ps395777]$ pwd
/home/hornenj/src/foo/tcptunnel
[ps395777]$ ./configure
checking host system type... Linux
sed: -e expression #2, char 16: unknown option to `s'
configure: configure complete, now type 'make' and 'make install'.

from tcptunnel.

vakuum avatar vakuum commented on May 30, 2024

Maybe sed is not the problem.

Please post the output of the following steps:

$ git clone https://github.com/vakuum/tcptunnel.git

$ cd tcptunnel

$ bash --version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
...

$ bash -x configure
++ echo
++ sed -n -e 's/.*--help.*/HELP/p'
+ HELP=
+ '[' '' = HELP ']'
++ echo
++ sed -n -e 's/.*--prefix=\([^\ ]*\).*/\1/p'
+ PREFIX=
+ '[' '!' '' ']'
+ PREFIX=/usr/local/bin/
++ sh -c 'echo /usr/local/bin/'
+ PREFIX=/usr/local/bin/
+ '[' '!' -d /usr/local/bin/ ']'
++ uname -s
+ OS=Linux
+ case "$OS" in
+ echo 'checking host system type... Linux'
checking host system type... Linux
++ echo /usr/local/bin/
++ sed 's#\/#\\/#g'
+ PREFIX='\/usr\/local\/bin\/'
+ sed -n -e 's/@PREFIX@/\/usr\/local\/bin\//g;' -e 's/@LDFLAGS@//g;' -e 'w ./src/Makefile' ./src/Makefile.in
+ echo 'configure: configure complete, now type '\''make'\'' and '\''make install'\''.'
configure: configure complete, now type 'make' and 'make install'.

from tcptunnel.

nigelhorne avatar nigelhorne commented on May 30, 2024
$ bash --version
GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)

$ bash -x ./configure
++ echo
++ sed -n -e 's/.*--help.*/HELP/p'
+ HELP=
+ '[' '' = HELP ']'
++ sed -n -e 's/.*--prefix=\([^\ ]*\).*/\1/p'
++ echo
+ PREFIX=
+ '[' '!' '' ']'
+ PREFIX=/usr/local/bin/
++ sh -c 'echo /usr/local/bin/'
+ PREFIX=/usr/local/bin/
+ '[' '!' -d /usr/local/bin/ ']'
++ uname -s
+ OS=Linux
+ case "$OS" in
+ echo 'checking host system type... Linux'
checking host system type... Linux
++ echo /usr/local/bin/
++ sed 's#\/#\\/#g'
+ PREFIX='\/usr\/local\/bin\/'
+ sed -n -e 's/@PREFIX@/\/usr\/local\/bin\//g;' -e 's/@LDFLAGS@/-L/home/hornenj/lib/g;' -e 'w ./src/Makefile' ./src/Makefile.in
sed: -e expression #2, char 16: unknown option to `s'
+ echo 'configure: configure complete, now type '\''make'\'' and '\''make install'\''.'
configure: configure complete, now type 'make' and 'make install'.

from tcptunnel.

vakuum avatar vakuum commented on May 30, 2024

There it is! :-)

The last sed command from my output doesn't contain a LDFLAGS value:

+ sed -n -e 's/@PREFIX@/\/usr\/local\/bin\//g;' -e 's/@LDFLAGS@//g;' -e 'w ./src/Makefile' ./src/Makefile.in

The last sed command from your output contains a LDFLAGS value:

+ sed -n -e 's/@PREFIX@/\/usr\/local\/bin\//g;' -e 's/@LDFLAGS@/-L/home/hornenj/lib/g;' -e 'w ./src/Makefile' ./src/Makefile.in

And this value is not correctly escaped, which results in an invalid regular expression:

$ sed -n -e 's/@PREFIX@/\/usr\/local\/bin\//g;' -e 's/@LDFLAGS@/-L/home/hornenj/lib/g;' -e 'w ./src/Makefile' ./src/Makefile.in
sed: -e expression #2, char 16: unknown option to `s'

So there must be an environment variable with the following content:

$ echo $LDFLAGS
-L/home/hornenj/lib

I will change the configure script to escape the LDFLAGS correctly.

from tcptunnel.

nigelhorne avatar nigelhorne commented on May 30, 2024

Indeed there is:

[ps395777]$ echo $LDFLAGS
-L/home/hornenj/lib
[ps395777]$

from tcptunnel.

vakuum avatar vakuum commented on May 30, 2024

@nigelhorne: I changed the configure script. Can you give it a try?

from tcptunnel.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.