SOS client on Solaris x86

If you are having a problem using SourceOffSite, post a message here.

Moderator: SourceGear

meddle
Posts: 6
Joined: Mon Jan 14, 2008 7:57 am

SOS client on Solaris x86

Post by meddle » Mon Jan 14, 2008 8:02 am

Is there any package of SOS client compiled for Solaris x86. The SPARC compilation is useless for us.
Than we tried to compile the sources but we run into several troubles despite we installed the newest gtk and glib version. The command line tool compiled but the GTK user interface not. `g_get_filename_charsets' was not declared in this scope is the error even with the newest gtk+-2.12.0.

help.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Mon Jan 14, 2008 8:35 am

What version of SOS are you using? You said you compiled the code -- Was that something we sent to you?
Linda Bauer
SourceGear
Technical Support Manager

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Jan 14, 2008 9:53 am

I'm not sure this helps, but here is a thread in Fedora talking about a similar problem - http://support.sourcegear.com/viewtopic.php?p=21377


I'm checking the GTK libraries to see if I can find the call to this function.
Jeff Clausius
SourceGear

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Jan 14, 2008 11:50 am

g_get_filename_charsets was introduced in GLIB 2.6. Its hard to tell what may be happening without the exact error messages you are seeing during compilation.

A couple of thoughts here:

a) the version of GLIB found on your system was not compiled with the defines required to include g_get_filename_charsets.

b) an older version of GLIB (2.5 and before) is found first in your library path, and it does not contain the symbol needed for compilation.
Jeff Clausius
SourceGear

meddle
Posts: 6
Joined: Mon Jan 14, 2008 7:57 am

Post by meddle » Tue Jan 15, 2008 1:42 am

The version I'm trying to compile is 4.1.2. I use these sources : http://download.sourcegear.com/files/so ... 1.2.tar.gz

And the strange thing is that my glib version is glib-2.14.1, and I obtained it by the pkg-get utility. I have no idea why the compilation doesn't work :( .

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Tue Jan 15, 2008 8:27 am

Can you use 'nm' to see if you can find the symbol for 'g_get_filename_charsets'? According to the the GTK docs, it should be there.

Another option would be to build GLIB yourself, and then use that library path when building SourceOffSite.

If you can give me a little bit of time, I'll see if I can set up a VM for Solaris 10 x86, and see if I can get a compilation of SOS.
Jeff Clausius
SourceGear

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Fri Jan 18, 2008 5:01 pm

OK. Here's what I know so far.

The build in Solaris is using /usr/lib and /usr/include as its default paths. Any GTK+ and GLIBs will be installed at /usr/local/lib, so the build is not finding the correct libraries/includes for building.

I'll need to test this, but I think we can get a build by downloading / installing all the necessary GTK/GLIB component and dependencies, and running configure with the necessary flags to compile and link.

I'll try this out early next week.
Jeff Clausius
SourceGear

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Jan 24, 2008 2:35 pm

Wow! That took a lot longer than I imagined.

OK, I got it, but it took a great deal of effort to get the steps correct:

1) I downloaded and installed gcc, make (gmake), gtk+2, glib, readline and all other dependent libraries from sunfreesoftware.com. The list is rather large, so make sure you get all dependencies.

2) Ran pgkadd -d <lib> on everything from step 1.

2) Untarred the sos tarball.

3) ran the following exports:
export CFLAGS=-I/usr/local/include
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export MAKE=/usr/local/bin/make

These vars allow configure and make to find the SunFreeSoftware versions rather than the ones installed by Sun. SOS will not build correctly without these tools/libs.

4) Ran ./configure and /usr/local/bin/make

5) Ran '/usr/local/bin/make install' with elevated privileges because my normal user didn't have rights to install SOS.

6) export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib

The libraries in /usr/lib did not have everything required to run SOS, so this needed to be set to find the libraries in /usr/local/lib.

7) Ran /usr/local/bin/sos to start the GUI.

I don't think I missed any steps, so let me know if you have any luck.
Jeff Clausius
SourceGear

meddle
Posts: 6
Joined: Mon Jan 14, 2008 7:57 am

Post by meddle » Mon Jan 28, 2008 7:08 am

That worked and the compile process went OK.But...
When I tried to run the compiled /usr/local/bin/sos my whole system blocked.
I ran top on other computer using ssh and the memory for sos was about 800 MB!
May be the dependencies are not in the right order, or I do not see other reason.
Thanks for the help I'll try to compile it on a freshly installed solaris, may be it will work.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon Jan 28, 2008 9:35 am

Check vmstat to make sure you are not thrashing.

I built this on a freshly installed Solaris 10 virtual machine with only 512 MB allocated memory. Launching SOS caused a ton of thrashing. Once I went to 1GB of memory, SOS seemed to run just fine.

I'm not sure this helps.
Jeff Clausius
SourceGear

meddle
Posts: 6
Joined: Mon Jan 14, 2008 7:57 am

Post by meddle » Tue Feb 05, 2008 3:37 am

So the client works! But now there is other problem, i don't know if you can help me here but it is possible you have the answer.

When I run the So client and the dialog for connecting to server shows, I enter the IP of our server, the correct pork and click the "OK" button.
The problem is I could not connect to the server with the following alert dialog:
"Server name could not be converted to the local character encoding environment"

And I don't have character encoding problems with any other program...

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Tue Feb 05, 2008 9:00 am

The error message occurs from a call to g_filename_from_utf8(). I honestly don't know what may cause failures here.

Another thing to try is to connect to the demo server - sos.sourceoffsite.com:8888 and see if that causes the same error.

If so, then there is something in the gtk function mentioned above which is causing the problem. I think libiconv will be used for some of this. Maybe you can check your dependencies / libraries to make sure some of the sub-libraries are present in the system.

HTH
Jeff Clausius
SourceGear

meddle
Posts: 6
Joined: Mon Jan 14, 2008 7:57 am

Post by meddle » Wed Feb 06, 2008 5:54 am

Thanks man, it works at last.
Thanks for everything, we appreciate your help a lot.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Feb 06, 2008 11:52 am

What was the problem from your last post?
Jeff Clausius
SourceGear

meddle
Posts: 6
Joined: Mon Jan 14, 2008 7:57 am

Post by meddle » Thu Feb 14, 2008 7:44 am

If the default encoding under solaris is set to "posix" the program does not run, bu if it's UTF-8 the program runs just fine.

Post Reply