Make cant find files located inside same directory

I have recently come from Gentoo (mainly because x86 entries everywhere in mine portage) and I am attempting to write a package to bring MSP430 development to my Raspberry pi 4.
currently working on a PKGBUILD file for binutils-msp430.

As neither the manual guide, neither the base PKGBUILD file were much help, I have been trying to understand the system by reverse engineering some other ones.mine PKGBUILD:

pkgname=binutils-msp430
pkgver=2.22
pkgrel=1
pkgdesc="A set of programs to assemble and manipulate binary and object files for the MSP430 architecture"
arch=('aarch64')
url="http://sourceforge.net/projects/mspgcc/"
license=('GPL')
depends=('zlib')
options=('!emptydirs' '!libtool')

_mspgcc_ver=20120406
_gnu_mirror="http://ftpmirror.gnu.org"
_sf_base="http://sourceforge.net/projects/mspgcc/files"
_zlodej="https://github.com/Zlodej-pozor/msp430/raw/main"
_patches_base="${_sf_base}/Patches/LTS/${_mspgcc_ver}"
$stara_path=$PATH
export PATH="${PATH}:./"
_patches=()

source=("${_sf_base}/mspgcc/mspgcc-${_mspgcc_ver}.tar.bz2"
       "${_gnu_mirror}/binutils/binutils-${pkgver}.tar.bz2"
   	"${_sf_base}/Patches/binutils-2.22/msp430-binutils-2.22-20120911.patch"
   	"${_zlodej}/msp430-binutils/config.guess")
       #"0001_ld_makefile_libdir.patch"
       #"0002_binutils-texinfo-5.0-gas-doc.patch"
       #"0003-binutils-texinfo-5.0.patch")
sha1sums=('cc96a7233f0b1d2c106eff7db6fc00e4ed9039a8'
         '65b304a0b9a53a686ce50a01173d1f40f8efe404'
         '5b3aec605f85fea81a22aa52e9900a5e2f9cc460'
         '0d2eadae75130308aff0f463fd40ee2c6fd72806' )
#          'b92aba28a090f214a650102ad0f0862c37b45e58'
#          '417b1cdb35c41a08d3ca967c165c0d79588986e9')

_builddir=build

prepare() {
 cd ${srcdir}/binutils-2.22/

 # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=avr-binutils-atmel
 # https://bugs.archlinux.org/task/34629
 sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure

 _patch_name="msp430-binutils-${pkgver}-${_mspgcc_ver}.patch"
 (cd "${srcdir}/binutils-2.22" &&
   # patch -p1 < "${srcdir}/msp430-binutils-2.22-20120407.patch" &&
   # patch -p1 < "${srcdir}/msp430-binutils-2.22-20120514.patch" &&
   # patch -p1 < "${srcdir}/msp430-binutils-2.22-20120606.patch" &&
   # patch -p1 < "${srcdir}/msp430-binutils-2.22-20120618.patch" &&
   # patch -p1 < "${srcdir}/msp430-binutils-2.22-20120627.patch" &&
   # patch -p1 < "${srcdir}/msp430-binutils-2.22-20120716.patch" &&
   patch -p1 < "${srcdir}/msp430-binutils-2.22-20120911.patch" )
 cp "${srcdir}/config.guess" ./ 

 rm -frv ${_builddir}
 mkdir -p ${_builddir} && cd ${_builddir}

}



build() {
 cd ${srcdir}/binutils-2.22/
 cd ${_builddir}
 CFLAGS="-Os -g0" "${srcdir}/binutils-2.22/configure" \
     --prefix=/usr \
     --program-prefix="msp430-" \
     --disable-multilib \
     --disable-werror \
     --disable-nls \
     --enable-install-libbfd \
     --infodir=/usr/share/info \
     --libdir=/usr/msp430/lib \
     --mandir=/usr/share/man \
     --target=msp430

 # This checks the host environment and makes sure all the necessary
 # tools are available to compile Binutils.
 make configure-host

 make tooldir=/usr all
}

check() {
 cd ${srcdir}/binutils-2.22/${_builddir}

 # do not abort on errors - manually check log files
 make -k -j1 check || true

}

package() {
 cd ${srcdir}/binutils-2.22/${_builddir}
 make DESTDIR=${pkgdir} tooldir=/usr install

 rm -f ${pkgdir}/usr/lib/libiberty.a
 rm -f ${pkgdir}/usr/man/man1/{dlltool,nlmconv,windres}*
 rm -f ${pkgdir}/usr/share/info/dir

 cd ${pkgdir}/usr/share/info
 for file in as bfd binutils configure gprof ld standards ; do
   mv ${file}.info "msp430-${file}.info"
 done

 for bin in addr2line ar as c++filt gprof ld nm objcopy \
           objdump ranlib readelf size strings strip
 do
   rm -f ${pkgdir}/usr/bin/${bin}
 done

 install -Dm644 "${srcdir}/binutils-2.22/COPYING" \
   "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

My patches go fine, config errors are sorted, but I have newer dealt with .texinfo files which give the following error:

bfd.texinfo:195: @include: could not find bfdsumm.texi
bfd.texinfo:199: @include: could not find bfdt.texi
bfd.texinfo:200: @include: could not find bfdio.texi
bfd.texinfo:244: @include: could not find init.texi
bfd.texinfo:247: @include: could not find section.texi
bfd.texinfo:250: @include: could not find syms.texi
bfd.texinfo:253: @include: could not find archive.texi
bfd.texinfo:256: @include: could not find format.texi
...

at:

if makeinfo --split-size=5000000 --split-size=5000000   -I /home/asi/Stiahnuté/Balikovanie/src/binutils-2.22/bfd/doc \
 -o bfd.info `test -f 'bfd.texinfo' || echo '/home/asi/Stiahnuté/Balikovanie/src/binutils-2.22/bfd/doc/'`bfd.texinfo; \
then \
  rc=0; \
else \
  rc=$?; \
  $restore $backupdir/* `echo "./bfd.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc

I have checked and all those files are in a same directory as the bfd.texinfo.
I am not sure what is the max size of a message on this forum I have put the out put to pastebin as sjevQvC9. Forum does not let me send links, so you will have to add it up.

:+1: Welcome to Manjaro! :+1:

  1. In the future, when providing code/output, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text so that the output looks like this:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    

    instead of like this:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    (as that makes both our lives much easier)

  2. No need to do anything right now as I’m a moderator here on this site and have fixed it for you already. However, in the future I might not see your post so review my RAW edits by pushing the orange pencil in the upper right corner of the post I just fixed. :wink:

  3. Please read this:

:+1:

I was developer in a former life, but not these days, Did you try the easy way? By installing the AUR package by adding ‘aarch64’ to the PKGBUILD?

- arch=('i686' 'x86_64')
+ arch=('i686' 'x86_64' 'aarch64')

Being new, not sure if you were aware.

Edit: It still may not build, but it does add two patches that may be related.

1 Like

I have tried using aurs PKG build first, but it created too many issues, in fact I have used the AUR’s PKGBUIL (available for an old version and apeared to have been abandoned) as a startup. As I am avare that aarch64 is not a mainstream I understand that there are quite few more packages which will need to be ported.
Although as ex-gentoo I would like to understand the texinfo issue as if it came to worse, otherwise, I could have attempted the ubuntus .deb already ported to the architecture.(this project does not update much). As the version on AUR is several year older the patches do not seem to apply, But I will check what happens to them.

OK, SO thanks to an unrelated issue by some kind of noodles and solved by jim-wilson (I didn’t recognize the other Chinese symbol) it seems that the parser used for texi file does not use relative paths and is incapable of processing non-asci characters in path to files. so I had to move to a different directory.
mine current PCKGBUILD:

# Contributor: Tomas Tucek <tucekt@gmail.com>build 
# based on apply-patches.sh from msp430-gcc-9.3.1.11-source-patches by texas instruments
# All in one package containing:
#    GCC 9.3.1.11
#    GDB 9.1
#    binutils 2.34
#    Newlib 2.4.0
#    MSPDebugStack 3.15.1.001
#    MSP430 header and support files 1.212
#    MSP430 GDB Agent 8.0.809.0
# If you want to divide this into multiple packages, Then be Mine guest.
# Feel free to make this into metapackage afterwards

########################################################################
#     Warning!!!!!                                                     #
#	As the parser of texi file is incapable of unicode (not even utf-8)#
#	this package will not pass make stage if PATH contains non-asci ach

pkgname=msp430-binutils
pkgver=2.34
pkgrel=1
pkgdesc="A set of programs to assemble and manipulate binary and object files for the MSP430 architecture"
arch=('aarch64')
url="https://www.ti.com/tool/MSP430-GCC-OPENSOURCE"
license=('GPL')
depends=('zlib')
options=('!emptydirs' '!libtool')
# set -e
# set -x

	binutils_patch="$(echo binutils-*.patch)"
	binutils_ver="$(echo $temp | tr '_' '.')"
	binutils_url="https://ftp.gnu.org/gnu/binutils/binutils-$binutils_ver.tar.bz2"

source=( "https://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.bz2"
		"http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_3_1_2/export/msp430-gcc-9.3.1.11-source-patches.tar.bz2")

sha1sums=('361566c9ab5e90bd847d06f46fb9f18ec6c3ecf0'
          '9fdd50f55f45abac089b9cef9985eb02e4e4c362')


_builddir=build

prepare() {
  cd ${srcdir}/binutils-*/
  ln -nfs "binutils-$binutils_ver" binutils
  patch -p0 -i ${srcdir}/msp430-gcc-*-source-patches/$binutils_patch
   rm -frv ${_builddir}
  mkdir -p ${_builddir} && cd ${_builddir}
}



build() {
  cd ${srcdir}/binutils-*/
  cd ${_builddir}
  CFLAGS="-Os -g0" "${srcdir}/binutils-${pkgver}/configure" \
      --prefix=/usr \
      --program-prefix="msp430-" \
      --disable-multilib \
      --disable-werror \
      --disable-nls \
      --enable-install-libbfd \
      --infodir=/usr/share/info \
      --libdir=/usr/msp430/lib \
      --mandir=/usr/share/man \
      --target=msp430

  # This checks the host environment and makes sure all the necessary
  # tools are available to compile Binutils.
  make configure-host

  make tooldir=/usr all
  libtool --finish
}

check() {
  cd ${srcdir}/binutils-*/${_builddir}

  # do not abort on errors - manually check log files
  make -k -j1 check || true

}

package() {
  cd ${srcdir}/binutils-*/${_builddir}
  make DESTDIR=${pkgdir} tooldir=/usr install

  rm -f ${pkgdir}/usr/lib/libiberty.a
  rm -f ${pkgdir}/usr/man/man1/{dlltool,nlmconv,windres}*
  rm -f ${pkgdir}/usr/share/info/dir

  cd ${pkgdir}/usr/share/info
  for file in as bfd binutils configure gprof ld standards ; do
    mv ${file}.info "msp430-${file}.info"
  done

  for bin in addr2line ar as c++filt gprof ld nm objcopy \
            objdump ranlib readelf size strings strip
  do
    rm -f ${pkgdir}/usr/bin/${bin}
  done

  install -Dm644 "${srcdir}/binutils-${pkgver}/COPYING" \
    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

file now reaches the installation stage but stops at the checking stake after make install with mv: nie je možné stat() 'configure.info': Adresár alebo súbor neexistuje
Losely translated as: Can't stat() 'configure.info' No such file or Directory .
I will be searching for english wordding for google to move forward.
As this question was about texi files and not about msp450 any questions will be in a different tema.
For anybody comming here latter, once done the PCKBUILDs will be on https://github.com/Zlodej-pozor/msp430

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.