[OpenIndiana-discuss] Compiling Mosh for OI 151

Robbie Crash sardonic.smiles at gmail.com
Tue May 1 18:39:11 UTC 2012


Thanks for all the pointers everyone. I'm now at this point as well. I also
ran into some issues getting perl to compile the IO::Pty module due to,
apparently known, Solaris weirdness with gcc, which Bryan Iotti touched on
earlier.

doing configure --libdir=/usr/gnu/lib --bindir=/usr/gnu/bin --enable-server
works, but trying to make gets me something similar to the above, but with
whinging about terminal functions with framebuffering:

terminaldisplay.cc: In member function ‘std::string
Terminal::Display::new_frame(bool, const Terminal::Framebuffer&, const
Terminal::Framebuffer&) const’:
terminaldisplay.cc:57:31: warning: format ‘%lc’ expects argument of type
‘wint_t’, but argument 4 has type ‘int’ [-Wformat]
terminaldisplay.cc:68:31: warning: format ‘%lc’ expects argument of type
‘wint_t’, but argument 4 has type ‘int’ [-Wformat]
terminaldisplay.cc:78:31: warning: format ‘%lc’ expects argument of type
‘wint_t’, but argument 4 has type ‘int’ [-Wformat]
terminaldisplay.cc: In member function ‘void
Terminal::Display::put_cell(bool, Terminal::FrameState&, const
Terminal::Framebuffer&) const’:
terminaldisplay.cc:346:34: warning: format ‘%lc’ expects argument of type
‘wint_t’, but argument 4 has type ‘int’ [-Wformat]
  CXX    terminaldisplayinit.o
  CXX    terminalframebuffer.o
terminalframebuffer.cc: In member function ‘bool
Terminal::Cell::compare(const Terminal::Cell&) const’:
terminalframebuffer.cc:575:48: warning: format ‘%lc’ expects argument of
type ‘wint_t’, but argument 3 has type ‘int’ [-Wformat]
terminalframebuffer.cc:575:48: warning: format ‘%lc’ expects argument of
type ‘wint_t’, but argument 4 has type ‘int’ [-Wformat]
  CXX    terminalfunctions.o
  CXX    terminaluserinput.o
  AR     libmoshterminal.a
make[3]: Leaving directory `/home/robbie/moshing/mosh-1.2/src/terminal'

And then actual failure when getting to the network portion of things:
Making all in network
make[3]: Entering directory `/home/robbie/moshing/mosh-1.2/src/network'
  CXX    network.o
In file included from network.cc:39:0:
network.h:79:48: error: expected ‘,’ or ‘...’ before ‘.’ token
network.cc: In constructor ‘Network::Packet::Packet(std::string,
Crypto::Session*)’:
network.cc:62:3: error: ‘__STRING’ was not declared in this scope
network.cc: In constructor ‘Network::Connection::Connection(const char*,
const char*)’:
network.cc:174:61: error: no matching function for call to
‘Network::Connection::try_bind(int&, uint32_t&, long int&)’
network.cc:174:61: note: candidate is:
network.h:79:17: note: static bool Network::Connection::try_bind(int,
uint32_t)
network.h:79:17: note:   candidate expects 2 arguments, 3 provided
network.cc:186:54: error: no matching function for call to
‘Network::Connection::try_bind(int&, unsigned int, long int&)’
network.cc:186:54: note: candidate is:
network.h:79:17: note: static bool Network::Connection::try_bind(int,
uint32_t)
network.h:79:17: note:   candidate expects 2 arguments, 3 provided
network.cc: At global scope:
network.cc:197:49: error: expected ‘,’ or ‘...’ before ‘.’ token
network.cc: In static member function ‘static bool
Network::Connection::try_bind(int, uint32_t)’:
network.cc:201:32: error: request for member ‘S_addr’ in ‘S_un’, which is
of non-class type ‘uint32_t {aka unsigned int}’
network.cc:205:16: error: invalid use of member (did you forget the ‘&’ ?)
network.cc:206:32: error: argument of type ‘int
(Network::Connection::)()const’ does not match ‘int’
network.cc: In member function ‘std::string Network::Connection::recv()’:
network.cc:298:3: error: ‘__STRING’ was not declared in this scope
make[3]: *** [network.o] Error 1
make[3]: Leaving directory `/home/robbie/moshing/mosh-1.2/src/network'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/robbie/moshing/mosh-1.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/robbie/moshing/mosh-1.2'
make: *** [all] Error 2

Configuring it for client is also failing with the same errors.

Aside from the fighting with perl which I don't have to do anymore, in
order to get to this point the commands I've run are:
CFLAGS="-L/usr/gnu/lib" CXXFLAGS="-L/usr/gnu/lib" ; export CFLAGS CXXFLAGS
export PKG_CONFIG_PATH="/usr/gnu/pkgconfig/"
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz
tar -xf protobuf-2.4.1.tar.gz
cd protobuf-2.4.1
./configure --bindir=/usr/gnu/bin --libdir=/usr/gnu/lib
make
sudo make install
cd ..
rm -rf protobuf-2.4.1
rn protobuf-2.4.1.tar.gz
wget https://github.com/downloads/keithw/mosh/mosh-1.2.tar.gz
tar -xf mosh-1.2.tar.gz
cd mosh-1.2
./configure --bindir=/usr/gnu/bin/ --libdir=/usr/gnu/lib/
--enable-[client|server]
make

On Tue, May 1, 2012 at 12:27, Jonathan Adams <t12nslookup at gmail.com> wrote:

> ./src/statesync/completeterminal.cc and ./src/network/transportsender.cc
>
> #ifndef INT_MAX
> #define INT_MAX         2147483647      /* max value of an "int" */
> #endif
>
> ./src/util/fatal_assert.h and ./src/util/dos_assert.h
>
> #ifndef __STRING
> #define __STRING(x) #x
> #endif
>
> ./src/network/network.h and ./src/network/network.cc have a problem
> with "s_addr" in the arguments to "try_bind"
>
>    static bool try_bind( int socket, uint32_t my_s_addr, int port );
>
> ./src/frontend/stmclient.cc has "cfmakeraw" which has no direct
> solaris equivalent ... I commented it out and hoped for the best.
>
> I compiled with: ./configure --prefix=/opt/tools CFLAGS=-m64
> CXXFLAGS=-m64 LDFLAGS="-R/usr/gnu/lib/amd64 -L/usr/gnu/lib/amd64"
> LIBS="-lsocket -lnsl"
>
> it's compiled the client, but not the server ... completely untested
> ... might look later.
>
> Jon
>
> On 1 May 2012 14:26, Bryan N Iotti <ironsides.medvet at gmail.com> wrote:
> > I also tried to compile it, but couldn't get it to succeed...
> >
> > I had to compile protobuf and ncurses first, then symlink
> libncursestw.so to
> > libncurses.so otherwise it wouldn't find it, then it appeared to work
> away
> > for a while, only to crash miserably on a missing "," or "." in
> network.h.
> > Undeclared __STRING was the last error.
> >
> > I'll look into it again in a couple of days, might be an easy fix.
> >
> > Bryan
> >
> >
> > On 05/ 1/12 11:24 AM, Sriram Narayanan wrote:
> >>
> >> You'll also need to get protocol-buffers to work.
> >>
> >> -- Sriram
> >> Belenix: www.belenix.org
> >>
> >> On Tue, May 1, 2012 at 2:50 PM, Bryan N Iotti
> >> <ironsides.medvet at gmail.com>  wrote:
> >>>
> >>> Also, you might want to use the version of GCC that you find on SFE.
> >>>
> >>> The OI one in /usr/bin/gcc is version 3.4.3, while the one in SFE is
> >>> 4.6.2.
> >>> I have had better luck compiling with the latter as opposed to the
> >>> former.
> >>>
> >>> When you have multiple compilers installed, you can set the one you
> want
> >>> to
> >>> use for the project by providing the CC flag to the configure script or
> >>> as
> >>> an environment variable:
> >>>
> >>> ./configure CC="/usr/gcc/4.6/bin/gcc" will set you up to use the SFE
> >>> version
> >>> of gcc
> >>>
> >>> Otherwise, go to the Oracle website and download the Solaris Studio
> >>> compiler
> >>> tarfile. It works well, but some software won't compile cleanly on it
> >>> since
> >>> the source code uses "gcc-isms". When it works it's a painless process.
> >>> Also, the license states that it can be used for free for both personal
> >>> and
> >>> commercial uses. It also ships with its own IDE, a version of NetBeans.
> >>>
> >>> ./configure CC="/opt/solarisstudio12.3/bin/cc" will set you up with the
> >>> Oracle compiler.
> >>>
> >>> Again, I hope this helps.
> >>>
> >>>   Bryan
> >>>
> >>> On 05/ 1/12 01:24 AM, James C. McPherson wrote:
> >>>>
> >>>> On  1/05/12 09:08 AM, Robbie Crash wrote:
> >>>>>
> >>>>> Honestly, I think including this, I'm still on single digits with
> what
> >>>>> I've
> >>>>> had to compile from source, and definitely the only thing that I've
> >>>>> ever
> >>>>> had to figure out, so you not being a professional is still leaps and
> >>>>> bounds ahead of me.
> >>>>>
> >>>>> I'm using gcc installed via "pkg install gcc", which I assume means
> I'm
> >>>>> getting it from OI.
> >>>>>
> >>>>> I set the two variables as you recommended, with my paths, (export
> >>>>>
> >>>>>
> >>>>>
> PKG_CONFIG_PATH="/usr/lib/amd64/pkgconfig/:/usr/lib/pkgconfig/:/usr/share/p
> >>>>> kgconfig/" and export
> >>>>> LD_LIBRARY_PATH="/usr/lib/:/usr/lib/:/usr/lib/amd64/") and still
> >>>>> receive
> >>>>> the same error.
> >>>>
> >>>>
> >>>> ... more below
> >>>>
> >>>>>>> No package 'ncurses' found
> >>>>>>>
> >>>>>>> I have no idea what TINFO is, but from googling around, I find it
> has
> >>>>>>> something to do with ncurses as an independent provider for
> something
> >>>>>>
> >>>>>> (I'm
> >>>>>>>
> >>>>>>> terribly helpful, I know). I know ncurses is installed and that
> other
> >>>>>>> programs that are dependent on it work, and there are libs  in
> >>>>>>
> >>>>>> /usr/gnu/lib
> >>>>>>>
> >>>>>>> and /usr/gnu/lib/amd64.
> >>>>
> >>>>
> >>>> ...
> >>>>
> >>>>>>> But setting either doesn't fix anything. However, this is the first
> >>>>>>> time
> >>>>>>> I've run into issues with a configure script not working, so this
> is
> >>>>>>> probably me not actually doing things properly. Specifying my
> libdir
> >>>>>>> to
> >>>>>>> either /usr/gnu/lib or /usr/gnu/lib/amd64 doesn't help either.
> >>>>>>>
> >>>>>>> Does anyone have any ideas for where to go from here?
> >>>>
> >>>>
> >>>> You need to verify that the ncurses package is correctly installed,
> >>>> and then when running mosh's configure script, ensure that you have
> >>>> /usr/gnu/lib (assuming that's where your ncurses libs are) in your
> >>>> CFLAGS/CXXFLAGS via something like this:
> >>>>
> >>>> CFLAGS="-L/usr/gnu/lib" CXXFLAGS="-L/usr/gnu/lib" ; export CFLAGS
> >>>> CXXFLAGS
> >>>>
> >>>> It's preferable to get gcc to use an rpath rather than forcing
> >>>> LD_LIBRARY_PATH to include /usr/gnu/lib, but if that's what it
> >>>> takes, that's what it takes.
> >>>>
> >>>>
> >>>> James C. McPherson
> >>>> --
> >>>> Solaris kernel software engineer, system admin and troubleshooter
> >>>>              http://www.jmcp.homeunix.com/blog
> >>>> Find me on LinkedIn @ http://www.linkedin.com/in/jamescmcpherson
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> OpenIndiana-discuss mailing list
> >>>> OpenIndiana-discuss at openindiana.org
> >>>> http://openindiana.org/mailman/listinfo/openindiana-discuss
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> OpenIndiana-discuss mailing list
> >>> OpenIndiana-discuss at openindiana.org
> >>> http://openindiana.org/mailman/listinfo/openindiana-discuss
> >>
> >> _______________________________________________
> >> OpenIndiana-discuss mailing list
> >> OpenIndiana-discuss at openindiana.org
> >> http://openindiana.org/mailman/listinfo/openindiana-discuss
> >
> >
> >
> > _______________________________________________
> > OpenIndiana-discuss mailing list
> > OpenIndiana-discuss at openindiana.org
> > http://openindiana.org/mailman/listinfo/openindiana-discuss
>
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
>



-- 
Seconds to the drop, but it seems like hours.

http://www.eff.org/
<http://www.eff.org/>http://creativecommons.org/


More information about the OpenIndiana-discuss mailing list