LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-14-2010, 01:04 AM   #1
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,515

Rep: Reputation: 235Reputation: 235Reputation: 235
C compiler cannot create executables


I was trying to compile xbmc today, and got the error about the c compiler not being able to create executables. I did a search on the forum, and found something from 2004. None of the suggestions there worked for me. I can compile libraries, because I did a few for dependencies.

The last thing I compiled with an executable was BloodFrontier, and it works perfectly. I have no idea where to go next.
 
Old 04-14-2010, 01:07 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
I'm not a programmer, but I think you will need to tell us exactly what the error message was.
 
Old 04-14-2010, 01:09 AM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,795

Rep: Reputation: 3754Reputation: 3754Reputation: 3754Reputation: 3754Reputation: 3754Reputation: 3754Reputation: 3754Reputation: 3754Reputation: 3754Reputation: 3754Reputation: 3754
I'll start with the standard answer: double-check that ARCH is set to x86_64.
http://slackbuilds.org/faq/#x86_64

Using Slackware64 and forgetting to set the ARCH environment variable is the usual cause of this error.

Last edited by dugan; 04-14-2010 at 01:12 AM.
 
Old 04-14-2010, 05:07 AM   #4
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,515

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
Here is the relevant part from configure.log:

Code:
configure:3611: checking whether the C++ compiler works
configure:3633: g++ -O2 -march=i486 -mtune=i686   -I/usr/lib/dbus-1.0/include   -I/usr/lib/glib-2.0/include   conftest.cpp  >&5
conftest.cpp:1: error: CPU you selected does not support x86-64 instruction set
configure:3637: $? = 1
configure:3675: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""xbmc""
| #define PACKAGE_TARNAME "-xbmc-"
| #define PACKAGE_VERSION "9.11"
| #define PACKAGE_STRING ""xbmc" 9.11"
| #define PACKAGE_BUGREPORT "http://xbmc.org/trac/"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3680: error: in `/tmp/SBo/xbmc-9.11':
configure:3684: error: C++ compiler cannot create executables
See `config.log' for more details.
 
Old 04-14-2010, 05:20 AM   #5
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,515

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
I think I have my answer after reading the log entry a bit closer. I went back to the slackbuild script and set the arch.
 
Old 04-14-2010, 06:17 AM   #6
rfernandez
Member
 
Registered: Mar 2010
Location: Brazil
Distribution: Slackware64
Posts: 264

Rep: Reputation: 41
Sometimes, I think that Slackbuilds.org should make the ARCH pattern as

Code:
ARCH=${ARCH:-`uname -m`}
Just to avoid some headaches. Or I'm I too lazy?
 
Old 04-14-2010, 07:16 AM   #7
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Quote:
Originally Posted by rfernandez View Post
Sometimes, I think that Slackbuilds.org should make the ARCH pattern as

Code:
ARCH=${ARCH:-`uname -m`}
Just to avoid some headaches. Or I'm I too lazy?
The scripts in Slackware already started using this and AFAIK thats the future plan for SlackBuilds.org also.
 
Old 04-14-2010, 09:19 AM   #8
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,515

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
One still has to check to make sure the script is updated.
Besides, while it seemed to have compiled, there was still no executable. I got more looking to do.
 
Old 04-16-2010, 12:56 AM   #9
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,515

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
I finally was able to compile xbmc for Slackware64-current. However, I compiled it on an older -current partition that had not been updated since January. I do not update that one as often in case there are problems. The problem I believe was with libpng-1.4x. That package either has problems, or something else has not caught up just yet. The older -current has libpng-1.27x.

XBMC compile and ran just fine there, so I simply installed the package on my fully updated -current partition. It runs just fine here as well. I wish I was able to give better information on the whys, but I am no programmer or code writer. I'm not even a good beta tester, but I seem to insist on running -current for some silly reason. Maybe for Alien's KDE pkgs.

Oh, and the XBMC version is 9.11.
 
Old 04-16-2010, 06:50 AM   #10
rfernandez
Member
 
Registered: Mar 2010
Location: Brazil
Distribution: Slackware64
Posts: 264

Rep: Reputation: 41
Quote:
Originally Posted by mlangdn View Post
The problem I believe was with libpng-1.4x. That package either has problems, or something else has not caught up just yet. The older -current has libpng-1.27x.
There has been some changes from libpng12 to libpng14, and some functions became deprecated. You should check the libpng changelog on their site to know what those changes are. I had a problem when compiling a program because of libpng14, and that changelog was my answer.
 
Old 04-16-2010, 08:11 AM   #11
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,515

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
I failed to mention last night that I found a patch to fix a problem xbmc had with libpng-1.4x. Evidently, the patch didn't help. So, in the interest of research and learning, I went to peruse the libpng changelog. No help there either. I'm not saying an answer isn't there, I'm just saying I didn't recognize one.
 
Old 04-16-2010, 08:29 AM   #12
rfernandez
Member
 
Registered: Mar 2010
Location: Brazil
Distribution: Slackware64
Posts: 264

Rep: Reputation: 41
I remember that when I tried to compile the program, my answer on the changelog was this:

Code:
replace
        png_check_sig(buf, 8)
with
        png_sig_cmp(buf, 0, 8) == 0
So, what I did was "sed" the configure script and everything was ok - the program compiled just as it should. Maybe, if you put the output of the configure or the build log here, we could see where the problem is, and also what patch you tried to apply.
 
Old 04-16-2010, 02:10 PM   #13
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,515

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
Each time I tried to build, I deleted everything previous. There is no log from the errors. However, I do have the libpng patch I inserted into the Slackbuild. I will attach that.
Attached Files
File Type: txt libpng-1.4.0-0.1.diff.txt (3.2 KB, 13 views)
 
Old 04-16-2010, 03:20 PM   #14
rfernandez
Member
 
Registered: Mar 2010
Location: Brazil
Distribution: Slackware64
Posts: 264

Rep: Reputation: 41
Yes, I saw the patch and, indeed, there is some fix there. From the libpng changelog:

Code:
5. Other changes

   a. We changed the names of the png_struct and info_struct members "trans"
      and "trans_values" to "trans_alpha" and "trans_color", respectively.
Which is the patch action. But I think that the output of ./configure would be more clarifying.
 
Old 04-16-2010, 09:23 PM   #15
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,515

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
Well, I was wrong - I do have a config log from a failed attempt. I should also add that I had no errors from configure, and it even seemed to compile in this one. There was just no executable after make.

Make install complained about xbmc.bin - no such file or directory.

I split this into two parts - it was too big for the forum limit. Read it if you like.

Part 1:
Attached Files
File Type: txt configpart1.txt (140.2 KB, 11 views)
 
  


Reply


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
C++ compiler cannot create executables eomerek Linux - Newbie 28 12-13-2010 09:14 AM
compiler cannot create executables glore2002 Slackware 2 08-24-2009 04:35 PM
c compiler cannot create executables karphead Slackware 8 09-30-2005 10:20 PM
C compiler cannot create executables shams Linux - Software 6 06-12-2004 01:55 PM
C compiler cannot create executables inanna Linux - Newbie 1 05-01-2004 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:43 PM.

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