LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Compilation complains: machine `x86_64-pc' not recognized. (http://www.linuxquestions.org/questions/slackware-14/compilation-complains-machine-%60x86_64-pc-not-recognized-4175447624/)

stf92 01-28-2013 10:51 PM

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.

gnashley 01-29-2013 01:33 AM

"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.

stf92 01-29-2013 02:15 AM

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?

knudfl 01-29-2013 03:19 AM

'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'.

-

wildwizard 01-29-2013 03:33 AM

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

wildwizard 01-29-2013 03:40 AM

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

knudfl 01-29-2013 04:03 AM

# 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.

-

wildwizard 01-29-2013 04:46 AM

Quote:

Originally Posted by knudfl (Post 4879704)
# 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)

gnashley 01-29-2013 08:26 AM

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.

stf92 01-29-2013 08:29 AM

Quote:

Originally Posted by wildwizard (Post 4879692)
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.

stf92 01-29-2013 05:14 PM

Quote:

Originally Posted by gnashley (Post 4879888)
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.

gnashley 01-30-2013 01:19 AM

"RPM package and convert it into a nice binary slackware package" Eeeww -why do that when the patches and everything are there?

knudfl 01-30-2013 01:47 AM

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

.. In the other "@stf92 arj thread"
#5 http://www.linuxquestions.org/questi...-4175447625/#5

gnashley 01-30-2013 06:48 AM

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...


All times are GMT -5. The time now is 07:21 PM.