Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] "tail: cannot open `+2' for reading" error

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
fikasnus
Posts: 2
Joined: 2013-06-11 15:39

[Solved] "tail: cannot open `+2' for reading" error

#1 Post by fikasnus »

Hiya,

I'm trying to compile some firmware for a router. The company that made the router kindly gave the source for the firmware plus their own building scripts so people could create their own firmware. I'm in the stage of attempting to get the unmodified firmware to compile using the provided build scripts and I'm running into a problem that seems to be stopping the firmware from producing a binary successfully. I'm using Debian Wheezy as my building environment.

The part where it starts to all go awry is here:
make -r -C hal/mips/pb42/current /home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/include/cyg/hal/plf_defs.inc
make[2]: Entering directory `/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/hal/mips/pb42/current'
mipsisa32-elf-gcc -finline-limit=7000 -mips32 -EB -msoft-float -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -G0 -mlong-calls -I/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/include -I/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/ecos/packages/hal/mips/pb42/current -I/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/ecos/packages/hal/mips/pb42/current/src -I/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/ecos/packages/hal/mips/pb42/current/tests -I. -Wp,-MD,plf_defs.tmp -o plf_mk_defs.tmp -S /home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/ecos/packages/hal/mips/pb42/current/src/plf_mk_defs.c
fgrep .equ plf_mk_defs.tmp | sed s/#// > /home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/include/cyg/hal/plf_defs.inc
tail: cannot open `+2' for reading: No such file or directory
make[2]: *** [/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/include/cyg/hal/plf_defs.inc] Error 1
make[2]: Leaving directory `/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/hal/mips/pb42/current'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld'
/bin/sh: 1: cd: can't cd to /home/ellis/Documents/release_GPL/bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/bin
mipsisa32-elf-objcopy: redboot.elf: No such file or directory
cp: cannot stat `redboot.rom': No such file or directory
make: *** [pb42_rom] Error 1
cp: cannot stat `./bootloader/ip1006aa_redboot_GPL_v102/rom_bld/install/bin/redboot.rom': No such file or directory
And the trouble seems to start here:
tail: cannot open `+2' for reading: No such file or directory
Google has told me that my problem is that the building scripts are using an old, outdated syntax for the tail command. I've tried two fixes that I found from searching, but unfortunately neither of those fixes work. One of the solutions given for fixing this was to use the command "export _POSIX2_VERSION=199209" in bash. This didn't work, and the error message stayed exactly the same. Another method I tried was using "sed -i 's/"tail +"/"tail -n +"/g' *" in to change any instances of the phrase in the source files, but that doesn't seem to work - every time I try to compile again using the build script I get the exact same message.

I've linked the complete build log here which may help provide some clues (very verbose).

Anyone have any thoughts or ideas? I'm a bit lost and admittedly out of my depth here. Any help would be very much appreciated. :)

Regards,
fikasnus
Last edited by fikasnus on 2013-06-15 22:47, edited 1 time in total.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: "tail: cannot open `+2' for reading" error when compilin

#2 Post by bw123 »

i have noticed that 'tail' has an issue lately with filenames & directories that begin with certain alphanumeric characters, but i haven't explored that too much.
resigned by AI ChatGPT

fikasnus
Posts: 2
Joined: 2013-06-11 15:39

Re: "tail: cannot open `+2' for reading" error when compilin

#3 Post by fikasnus »

Hi again,

After a little bit of prying, I've discovered that the files in question came from an archive that was being untarred by the installer during the install process. The files being in an archive was most likely why grep never found them.

I've now fixed the problem by changing the source files inside the archive and recompressing it. Now I have a whole new of different, unrelated problems. :lol:

Regards,
fikasnus

zekeliu
Posts: 1
Joined: 2017-04-13 09:54

Re: [Solved] "tail: cannot open `+2' for reading" error

#4 Post by zekeliu »

are you compiling belkin n1 vision? i now met the same issue . how do you fix it in details ? and the issues after fixing this?

Post Reply