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
 
LinkBack Search this Thread
Old 01-28-2013, 10:51 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,911

Rep: Reputation: 45
Compilation complains: machine `x86_64-pc' not recognized.


Slackware 14.0

Hi: I have arj-3.10.22.tar.gz, a tarball containing ARJ software from sourceforge. It compiled under 12.0. Under 14.0, after I run autoheader and autoconf, configure complains (I have 14.0, x86_64):
Code:
semoi@darkstar:~/src/arj-3.10.22/gnu$ ./configure 
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking build system type... Invalid configuration `x86_64-pc-linux-gnuoldld': machine `x86_64-pc' not recognized
configure: error: /bin/sh ./config.sub x86_64-pc-linux-gnuoldld failed
semoi@darkstar:~/src/arj-3.10.22/gnu$
The page where sourceforge redirected me says
Quote:
Last update: 2010-12-18.
Can there be a source variable I can modify to make it accept the "x86_64-pc" thing? A program conceived for 32 bits should run on 64 bits.
 
Old 01-29-2013, 01:33 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
"A program conceived for 32 bits should run on 64 bits." Not necessarily.
"./config.sub x86_64-pc-linux-gnuoldld failed" Try copying a newer version of config.sub into the sources and see if that will work (from /usr/share/automake-x.xx/config.sub) I'm pretty sure it's the 'gnuoldld' part which is failing. That said, there are some sources which have their own routines which assign the arch and you may have to patch the sources to accept that configuration. Do a 'grep -nrH 'linux-gnu' *' inside the sources to look for such code bits.
 
1 members found this post helpful.
Old 01-29-2013, 02:15 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,911

Original Poster
Rep: Reputation: 45
I did replace config.sub and the configure ran OK. Compilation failed:
Code:
fardata.c:193:12: error: conflicting types for 'strnlen'
In file included from environ.h:99:0,
                 from arj.h:13,
                 from fardata.c:8:
/usr/include/string.h:406:15: note: previous declaration of 'strnlen' was here
gmake[1]: *** [linux-gnuoldld/en/rs/arj/fardata.o] Error 1
gmake[1]: Leaving directory `/home/semoi/src/arj-3.10.22'
gmake: *** [all] Error 2
semoi@darkstar:~/src/arj-3.10.22$
Then I did
Code:
semoi@darkstar:~/src/arj-3.10.22$ grep -nrH 'linux-gnu' *
GNUmakefile:64:BASEDIR = $(SRC_DIR)/linux-gnuoldld/$(LOCALE)/$(DEBUG_SM)$(PACKAGE)
GNUmakefile:65:BASEDIR_C = $(SRC_DIR)/linux-gnuoldld/$(LOCALE)/$(DEBUG_SM)c
GNUmakefile:87:COPT = -c -Ilinux-gnuoldld -I$(BASEDIR) -I$(SRC_DIR) -g -O2 $(ALL_CFLAGS)
gnu/arj.spec:34:install -m 755 linux-gnu/en/rs/arj/arj $RPM_BUILD_ROOT/usr/bin/arj
gnu/arj.spec:35:install -m 755 linux-gnu/en/rs/arjdisp/arjdisp $RPM_BUILD_ROOT/usr/bin/arjdisp
gnu/arj.spec:36:install -m 755 linux-gnu/en/rs/rearj/rearj $RPM_BUILD_ROOT/usr/bin/rearj
gnu/config.guess:413:	  echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
gnu/config.guess:415:	  echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
gnu/config.guess:417:	  echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
gnu/config.guess:419:	  echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
gnu/config.guess:421:	  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
gnu/config.guess:423:	  echo "powerpc-unknown-linux-gnu" ; exit 0
gnu/config.guess:425:	  echo alpha-unknown-linux-gnu ; exit 0
gnu/config.guess:427:	  echo sparc-unknown-linux-gnu ; exit 0
gnu/config.guess:429:	  # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
gnu/config.guess:430:	  # useful --help.  Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
gnu/config.guess:432:	    && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
gnu/config.guess:440:  printf ("%s-pc-linux-gnu\n", argv[1]);
gnu/config.guess:442:  printf ("%s-pc-linux-gnuaout\n", argv[1]);
gnu/config.sub:125:  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
gnu/config.sub:126:  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
gnu/config.sub:1146:		os=-linux-gnu
gnu/config.sub:1334:		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
gnu/config.sub:1356:	      | -mingw32* | -linux-gnu* | -linux-android* \
gnu/config.sub:1393:		os=`echo $os | sed -e 's|linux|linux-gnu|'`
gnu/config.log:49:configure:2272: result: x86_64-pc-linux-gnuoldld
gnu/config.log:51:configure:2305: result: x86_64-pc-linux-gnuoldld
gnu/config.log:784:configure:4186: result: linux-gnuoldld
gnu/config.log:818:ac_cv_build=x86_64-pc-linux-gnuoldld
gnu/config.log:873:ac_cv_host=x86_64-pc-linux-gnuoldld
gnu/config.log:923:OUT_DIR='linux-gnuoldld'
gnu/config.log:938:build='x86_64-pc-linux-gnuoldld'
gnu/config.log:941:build_os='linux-gnuoldld'
gnu/config.log:948:host='x86_64-pc-linux-gnuoldld'
gnu/config.log:951:host_os='linux-gnuoldld'
gnu/config.sub.ori:71:  nto-qnx* | linux-gnu*)
gnu/config.sub.ori:675:		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
gnu/config.sub.ori:694:	      | -linux-gnu* | -uxpv*)
gnu/config.sub.ori:710:		os=`echo $os | sed -e 's|linux|linux-gnu|'`
gnu/config.status:622:S["OUT_DIR"]="linux-gnuoldld"
gnu/config.status:635:S["host_os"]="linux-gnuoldld"
gnu/config.status:638:S["host"]="x86_64-pc-linux-gnuoldld"
gnu/config.status:639:S["build_os"]="linux-gnuoldld"
gnu/config.status:642:S["build"]="x86_64-pc-linux-gnuoldld"
Binary file linux-gnuoldld/en/ds/arj/date_sig.o matches
Binary file linux-gnuoldld/en/ds/arj/fmsg_arj.o matches
Binary file linux-gnuoldld/en/ds/arj/imsg_arj.o matches
Binary file linux-gnuoldld/en/ds/arj/nmsg_arj.o matches
Binary file linux-gnuoldld/en/ds/arj/decode.o matches
Binary file linux-gnuoldld/en/ds/arj/encode.o matches
Binary file linux-gnuoldld/en/ds/arj/arj.o matches
linux-gnuoldld/en/ds/imsg_arj.c:14:#include "./linux-gnuoldld/en/ds/msg_arj.h"
Binary file linux-gnuoldld/en/rs/arj/date_sig.o matches
Binary file linux-gnuoldld/en/rs/arj/fmsg_arj.o matches
Binary file linux-gnuoldld/en/rs/arj/imsg_arj.o matches
Binary file linux-gnuoldld/en/rs/arj/nmsg_arj.o matches
Binary file linux-gnuoldld/en/rs/arj/decode.o matches
Binary file linux-gnuoldld/en/rs/arj/encode.o matches
Binary file linux-gnuoldld/en/rs/arj/arj.o matches
linux-gnuoldld/en/rs/imsg_arj.c:14:#include "./linux-gnuoldld/en/rs/msg_arj.h"
semoi@darkstar:~/src/arj-3.10.22$
What is the string I must replace within the files found by grep? 'linux-gnuoldld'? And what would be the new string?
 
Old 01-29-2013, 03:19 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,188

Rep: Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369
'arj-3.10.22' is a ten year old program. ( Slackware 12 is a bit old too.)

Today some patches are used.
Google .. arj-3.10.22 .. , and you will see packages with patches.

Example ftp://ftp.sunet.se/pub/Linux/distrib...4.fc17.src.rpm
> arj-3.10.22-14.fc17.src.rpm
> arj-3.10.22-custom-printf.patch arj-3.10.22-missing-protos.patch arj-3.10.22-quotes.patch

I typed : rpm -Uvh arj-3.10.22-14.fc17.src.rpm
.. and : rpmbuild -bb arj.spec,
and arj was compiled to : arj-3.10.22-14.x86_64.rpm,
so the patches will do the trick.
Suggest : Use the three patches with 'src2pkg'.

-

Last edited by knudfl; 01-30-2013 at 01:35 AM.
 
Old 01-29-2013, 03:33 AM   #5
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 749

Rep: Reputation: 225Reputation: 225Reputation: 225
stf92 I think you can ignore that oldgnu crap as it seems to be more about internal paths than anything else

Now the problem you have with strnlen is easily fixed you just put a
#if 0
#endif
around the function and it will compile past that point

I tested it and it does generate an arj executable that seems to work but the build will fail later on still.

You will find your arj executable in linux-gnuoldld/en/rs/arj/arj
 
Old 01-29-2013, 03:40 AM   #6
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 749

Rep: Reputation: 225Reputation: 225Reputation: 225
Looking at knudfl's file and it seems Debian is the source for patches

http://ftp.de.debian.org/debian/pool....debian.tar.gz

Seems to be a bit more current (ver 10) that rpm only had version 6
 
1 members found this post helpful.
Old 01-29-2013, 04:03 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,188

Rep: Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369
# 6

6 or 10 are not version numbers. But build "numbers".
All "arj-3.10.22" is the same 'year 2002' source package.

Debian patches :
001_arches_align.patch
002_no_remove_static_const.patch
003_64_bit_clean.patch
004_parallel_build.patch
005_use_system_strnlen.patch
006_use_safe_strcpy.patch
doc_refer_robert_k_jung.patch
gnu_build_fix.patch

Note : This list is here only to show the difference from the rpm package.
Do not use the Debian patches. Too many are for Debian only.

-

Last edited by knudfl; 01-30-2013 at 01:33 AM.
 
Old 01-29-2013, 04:46 AM   #8
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 749

Rep: Reputation: 225Reputation: 225Reputation: 225
Quote:
Originally Posted by knudfl View Post
# 6

6 or 10 are not version numbers. But build "numbers".
All "arj-3.10.22" is the same 'year 2002' source package.
If your going to argue semantics try to get it right.

http://www.debian.org/doc/debian-pol...rolfields.html
debian_revision

Also a file that is nothing more than a series of patches can not have a "build" number as it is not a build of anything.

The file I linked to is nothing more than the patches required to build arj, and it is more up to date then the file include in the rpm you linked to. Therefore it is the correct set of patches to use to fix arj, (and I would trust Debian more than RedHat anyday)
 
Old 01-29-2013, 08:26 AM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
BTW, the fact that it did configure successfully using a newer config.sub means that was enough for the first error you reported. The second error is in the source files -which the patch(es) obviously fix. But beware of simply applying all of the debian (or anybody else's) patches. Some of them may do distro-specific things which you don not want or that may actually break things on other systems.

Looking at that patch list, I'd first ask: Who the heck is robert_k_jung? The parallel build patch is probably superfluous -the rest are probably okay, but I'd read the top of the patch and/or debian/changelog to see what they are supposed to do.
 
Old 01-29-2013, 08:29 AM   #10
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,911

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by wildwizard View Post
Looking at knudfl's file and it seems Debian is the source for patches

http://ftp.de.debian.org/debian/pool....debian.tar.gz

Seems to be a bit more current (ver 10) that rpm only had version 6
In my old programmer days, as compiling was a very slow process, I made a patch for the compiler and afterwards the team chief was complaining that everyone used the patch and then compilations lack there hardcopy listings.

But now I would not even know where to start with, with a patch. Could you tell me if the patching process is too complex?

EDIT: Lapsus mentis: it was not a compiler patch but a program to patch executable programs, so that if a bug was discovered, there was no need to recompile.

Last edited by stf92; 01-30-2013 at 01:10 PM.
 
Old 01-29-2013, 05:14 PM   #11
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,911

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by gnashley View Post
BTW, the fact that it did configure successfully using a newer config.sub means that was enough for the first error you reported. The second error is in the source files -which the patch(es) obviously fix. But beware of simply applying all of the debian (or anybody else's) patches. Some of them may do distro-specific things which you don not want or that may actually break things on other systems.

Looking at that patch list, I'd first ask: Who the heck is robert_k_jung? The parallel build patch is probably superfluous -the rest are probably okay, but I'd read the top of the patch and/or debian/changelog to see what they are supposed to do.
Look at wikipedia, "ARJ". ARJ inc only developed or develops for MS-DOS/Windows. Nothing to do with Unix-like OSs. This pretends to be a clone.

By the way, I already been able to use a source RPM package and convert it into a nice binary slackware package. Thanks, guys. I would not have done without your help, specially knudfl's.
 
Old 01-30-2013, 01:19 AM   #12
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
"RPM package and convert it into a nice binary slackware package" Eeeww -why do that when the patches and everything are there?
 
Old 01-30-2013, 01:47 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,188

Rep: Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369Reputation: 2369
Ref. # 12 : Well, src2pkg has been suggested to @stf92.

.. In the other "@stf92 arj thread"
#5 http://www.linuxquestions.org/questi...-4175447625/#5
 
Old 01-30-2013, 06:48 AM   #14
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Yeah, just place the sources and patches together in a clean directory, cd in there and run:
src2pkg -A name-of-tarball -you might be amazed...
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
x86_64 virtual machine question. thegato Slackware 1 09-04-2010 04:10 PM
ipm timed out error on Red Hat 2.6.9-67.0.22.ELsmp #1 SMP x86_64 x86_64 x86_64 GNU/L bellnarm Linux - Newbie 0 07-07-2009 04:36 PM
glade application compilation problem - complains about libasound.so error nkd Linux - Software 1 11-07-2008 11:47 AM
Compilation Issues x86_64 (rocksaw) w3bd3vil Linux - Software 4 05-10-2007 07:55 PM
linux 32 bit compilation on x86_64 with autoconf skullmunky Programming 3 03-16-2007 03:57 PM


All times are GMT -5. The time now is 11:53 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration