[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51830] gethostname and uname nodename return
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost" |
Date: |
Wed, 30 Aug 2017 13:59:05 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #27, bug #51830 (project octave):
You might be right about 32-bit vs 64-bit, someone should try building each
and compare results with the same mxe-octave state and the same octave
revision.
Here's what your config.log says
configure:61378: checking for gethostname
configure:61378: i686-w64-mingw32-gcc -std=gnu11 -o conftest.exe -g -O2
-pthread -fopenmp
-I/home/johnd/mxe-octave/build-qt4/usr/i686-w64-mingw32/include
-Wl,-rpath-link,/home/johnd/mxe-octave/build-qt4/usr/i686-w64-mingw32/lib
-L/home/johnd/mxe-octave/build-qt4/usr/i686-w64-mingw32/lib
-L/home/johnd/mxe-octave/build-qt4/usr/i686-w64-mingw32/lib conftest.c -lm
-lgdi32 -lws2_32 -luser32 -lkernel32 -lgdi32 -lws2_32 -luser32 -lkernel32 >&5
/tmp/ccXHZXwc.o: In function `main':
/home/johnd/mxe-octave/build-qt4/tmp-stable-octave/octave-4.2.0/.build/conftest.c:350:
undefined reference to `gethostname'
collect2: error: ld returned 1 exit status
configure:61378: $? = 1
configure:61378: result: no
and here's mine with the same test, only difference is compiling for 64-bit:
configure:61378: checking for gethostname
configure:61378: x86_64-w64-mingw32-gcc -std=gnu11 -o conftest.exe -g -O2
-pthread -fopenmp
-I/home/mike/src/octave/mxe-octave/usr/x86_64-w64-mingw32/include
-Wl,-rpath-link,/home/mike/src/octave/mxe-octave/usr/x86_64-w64-mingw32/lib
-L/home/mike/src/octave/mxe-octave/usr/x86_64-w64-mingw32/lib
-L/home/mike/src/octave/mxe-octave/usr/x86_64-w64-mingw32/qt5/lib conftest.c
-lm -lgdi32 -lws2_32 -luser32 -lkernel32 -lgdi32 -lws2_32 -luser32
-lkernel32 >&5
configure:61378: $? = 0
configure:61378: result: yes
After the test fails on 32-bit, the followup test then passes:
configure:61386: checking for gethostname in winsock2.h and -lws2_32
configure:61418: i686-w64-mingw32-gcc -std=gnu11 -o conftest.exe -g -O2
-pthread -fopenmp
-I/home/johnd/mxe-octave/build-qt4/usr/i686-w64-mingw32/include
-Wl,-rpath-link,/home/johnd/mxe-octave/build-qt4/usr/i686-w64-mingw32/lib
-L/home/johnd/mxe-octave/build-qt4/usr/i686-w64-mingw32/lib
-L/home/johnd/mxe-octave/build-qt4/usr/i686-w64-mingw32/lib conftest.c -lm
-lgdi32 -lws2_32 -luser32 -lkernel32 -lgdi32 -lws2_32 -luser32 -lkernel32
-lws2_32 >&5
configure:61418: $? = 0
configure:61426: result: yes
The important difference appears to be that "-lws2_32" is appended to the end
of the list of libraries.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51830>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51830] uname nodename sometimes gives "localhost" instead of pc name, (continued)
- [Octave-bug-tracker] [bug #51830] uname nodename sometimes gives "localhost" instead of pc name, John Donoghue, 2017/08/30
- [Octave-bug-tracker] [bug #51830] uname nodename sometimes gives "localhost" instead of pc name, Mike Miller, 2017/08/30
- [Octave-bug-tracker] [bug #51830] uname nodename sometimes gives "localhost" instead of pc name, John Donoghue, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", Mike Miller, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", John Donoghue, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", Mike Miller, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", Mike Miller, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", John W. Eaton, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", Mike Miller, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", John Donoghue, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost",
Mike Miller <=
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", Mike Miller, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", John W. Eaton, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", Mike Miller, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", Marshall, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", Mike Miller, 2017/08/30
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", John W. Eaton, 2017/08/31
- [Octave-bug-tracker] [bug #51830] gethostname and uname nodename return "localhost", Mike Miller, 2017/08/31