LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 07-22-2017, 09:47 AM   #1
abourke
Member
 
Registered: Dec 2006
Posts: 111

Rep: Reputation: 18
Compile a 64bit library


Hi,

Im trying to compile the murrine theme engine.
So far I can only make 32bit versions.
I need a 64bit version.

I Downloaded the source here:
https://github.com/GNOME/murrine

And I tried compiling after running this command:
export CFLAGS=-m64

But it only generates a 32bit binary. So how do I make a 64bit version?

Last edited by abourke; 07-22-2017 at 09:48 AM.
 
Old 07-22-2017, 10:29 AM   #2
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,082

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Hey abourke - not sure this is going to get the best attention in the Newbie forum. Maybe the Linux - Software or Linux - General forums ?

Sorry I can't be of any help to you.
 
Old 07-22-2017, 10:46 AM   #3
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 329Reputation: 329Reputation: 329Reputation: 329
Are you running a 32 bit distro?

Had to tweak autogen.sh a little, but otherwise it compiled fine here:
Code:
~$ uname -m
x86_64
~/test_area/murrine-master$ file .libs/libmurrine.so 
libmurrine.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=31244c9c5ea93d884660a8a96ff078fccead0150, not stripped
 
1 members found this post helpful.
Old 07-23-2017, 03:00 AM   #4
abourke
Member
 
Registered: Dec 2006
Posts: 111

Original Poster
Rep: Reputation: 18
Wow! Awesome, Can you show me how to do it?
 
Old 07-23-2017, 03:02 AM   #5
abourke
Member
 
Registered: Dec 2006
Posts: 111

Original Poster
Rep: Reputation: 18
Im running a 64bit distro (Solaris 11.3)
Problem I have is that Java apps require a 64bit theme engine.
Rest of Solaris uses 32bit gtk2 theme engine.
 
Old 07-24-2017, 03:33 AM   #6
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 533

Rep: Reputation: 253Reputation: 253Reputation: 253
Please post the output of the following command on your machine:
Code:
uname -a
and please tell us what steps you are exactly following to compile Murrine.
 
Old 07-25-2017, 05:18 AM   #7
abourke
Member
 
Registered: Dec 2006
Posts: 111

Original Poster
Rep: Reputation: 18
uname -a gives me:
Quote:
SunOS Adventure 5.11 11.3 i86pc i386 i86pc
I unzip the zip file from
https://github.com/GNOME/murrine

Then I change directory to it.

Then I export my path to include
Quote:
export PATH=$PATH:/usr/local/bin
because I was getting this error:
Quote:
configure: error: GNU gettext tools not found; required for intltool
So I compiled it and placed it in /usr/local/bin

To compile Murrine:
Quote:
./configure --target=x86_64-solaris-gcc "CFLAGS=-m64" "CXXFLAGS=-m64" "LDFLAGS=-m64" && make
That returns:
Quote:
Now type 'make' to compile murrine.
Making all in schema
LC_ALL=C /usr/bin/intltool-merge -x -u -c ../po/.intltool-merge-cache ../po murrine.xml.in murrine.xml
Found cached translation database
Merging translations into murrine.xml.
CREATED murrine.xml
Then
Quote:
make install
Returns:
Quote:
Making install in schema
test -z "/usr/local/share/gtk-engines" || /usr/bin/gmkdir -p "/usr/local/share/gtk-engines"
/usr/bin/ginstall -c -m 644 murrine.xml '/usr/local/share/gtk-engines'
test -z "/usr/local/lib/gtk-2.0/2.10.0/engines" || /usr/bin/gmkdir -p "/usr/local/lib/gtk-2.0/2.10.0/engines"
/bin/sh ./libtool --mode=install /usr/bin/ginstall -c libmurrine.la '/usr/local/lib/gtk-2.0/2.10.0/engines'
libtool: install: /usr/bin/ginstall -c .libs/libmurrine.so /usr/local/lib/gtk-2.0/2.10.0/engines/libmurrine.so
libtool: install: chmod +x /usr/local/lib/gtk-2.0/2.10.0/engines/libmurrine.so
libtool: install: /usr/bin/ginstall -c .libs/libmurrine.lai /usr/local/lib/gtk-2.0/2.10.0/engines/libmurrine.la
Finally:
Quote:
file /usr/local/lib/gtk-2.0/2.10.0/engines/libmurrine.so
Returns:
Quote:
ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped
 
Old 07-25-2017, 07:04 AM   #8
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,082

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Hi again abourke - I'll let others here more familiar with Solaris confirm, but it seems to me your uname -a output indicates that you are running a 32-bit version of Solaris. I would have expected to see something resembling "x86_64" somewhere instead of just i386.

See for example the output of the same command on my 64-bit Arch system:

Code:
[rick@RickSP3 ~]$ uname -a
Linux RickSP3 4.11.9-1-ARCH #1 SMP PREEMPT Wed Jul 5 18:23:08 CEST 2017 x86_64 GNU/Linux
[rick@RickSP3 ~]$
... Could this be the root of your problems compiling in 64-bit ?

Can someone confirm ?

Last edited by Rickkkk; 07-25-2017 at 07:07 AM.
 
Old 07-25-2017, 07:47 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,457

Rep: Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859
yes, it looks like a 32bit system and also the result lib is compiled for a 32bit system.
If I remember well you need to use a cross-compiler to be able to compile for a different target system.
 
Old 07-26-2017, 12:30 AM   #10
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 533

Rep: Reputation: 253Reputation: 253Reputation: 253
Quote:
SunOS Adventure 5.11 11.3 i86pc i386 i86pc
Yup, 32-bit system it is.

And if I'm not mistaken, if your OS is 64-bit you can cross-compile for a 32-bit system but if the OS is 32-bit you cannot make 64-bit binaries by cross-compiling.

So, you probably need a 64-bit OS.
 
Old 07-27-2017, 04:47 AM   #11
abourke
Member
 
Registered: Dec 2006
Posts: 111

Original Poster
Rep: Reputation: 18
yes I think it must be 32bit. That explains my problem. I dont know how I missed that. I thought Oracle stopped distributing 32 bit Solaris.
 
Old 07-27-2017, 08:43 AM   #12
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175
Quote:
Originally Posted by aragorn2101 View Post
And if I'm not mistaken, if your OS is 64-bit you can cross-compile for a 32-bit system but if the OS is 32-bit you cannot make 64-bit binaries by cross-compiling.
Actually, you can. The gcc compiler suite is capable of cross-compiling, but makefiles and so-forth will normally detect that you're running a 32-bit system and default to 32-bit output for the architecture they detect. You must alter the makefile and/or provide additional options to make, in order to do any sort of cross-platform compile (where the target is not to be the present host).

Be mindful, however, that a 32-bit CPU cannot run a 64-bit binary! (But a 64-bit CPU can run a 32-bit binary.)
 
2 members found this post helpful.
Old 07-30-2017, 06:21 AM   #13
abourke
Member
 
Registered: Dec 2006
Posts: 111

Original Poster
Rep: Reputation: 18
It looks like it is a 64bit OS after all:

Quote:
isainfo
amd64 i386
So what should I do to compile?
 
Old 07-30-2017, 09:16 AM   #14
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,082

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Quote:
Originally Posted by abourke View Post
It looks like it is a 64bit OS after all:



So what should I do to compile?
I am unfamiliar with that command, but I'm guessing that it may be reporting that you have 64-bit hardware running a 32-bit OS.
 
Old 07-30-2017, 10:15 AM   #15
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,457

Rep: Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859Reputation: 3859
Why do you need a 64bit lib? If you have a 64bit system try to compile this lib on that host.
 
  


Reply

Tags
64bit, theme engine


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to build opencv picks up wrong library (32bit not 64bit) TarFile Slackware 15 04-26-2016 01:43 PM
Can't compile lufs on 64bit 144419855310001 Linux - Software 4 07-12-2006 09:24 AM
Using a 32bit library on a 64bit computer sniff Programming 1 07-04-2006 03:47 AM
How can I compile 64bit with g++, Enterprise 3, AMD64 ?? philblou Programming 1 08-04-2004 05:04 PM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 05:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration