IndexError: tuple index out of range

RedEye

New Member
Joined
Sep 17, 2019
Messages
15
Reaction score
3
Credits
0
Using Linux Mint 19 Cinnamon. Really hoping I can get a hand with this as its my livelihood and I live in the middle of nowhere! Please be gentle with me because even though I'm a long time user, I'm still not the best with this stuff but I can follow directions! I will be glued to this forum so any info you need, ill obtain it right away!

So I'm currently trying to get clockworkmod onto linux. It worked before but recently installed a fresh OS using the same file from last time. I found another forum that had the same problem which worked for him but its not working for me. So here is my problem.


dev@dev-Presario-CQ57-Notebook-PC:~$ cd 1
dev@dev-Presario-CQ57-Notebook-PC:~/1$ cd 1
dev@dev-Presario-CQ57-Notebook-PC:~/1/1$ dir
common linux node node-tuntap README
dev@dev-Presario-CQ57-Notebook-PC:~/1/1$ cd node
dev@dev-Presario-CQ57-Notebook-PC:~/1/1/node$ dir
AUTHORS common.gypi deps make-darwin.sh src
benchmark config.gypi doc Makefile test
BSDmakefile config.mk lib node.gyp tools
ChangeLog configure LICENSE README.md vcbuild.bat
dev@dev-Presario-CQ57-Notebook-PC:~/1/1/node$ ./configure
Traceback (most recent call last):
File "./configure", line 463, in <module>
configure_node(output)
File "./configure", line 370, in configure_node
o['variables']['gcc_version'] = 10 * cc_version[0] + cc_version[1]
IndexError: tuple index out of range

The solution on other forum was to enter
proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE)

Then change dumpversion to dumpfullversion

When I enter that proc code i get this
bash: syntax error near unexpected token `('
 


G'day RedEye, and Welcome to linux.org

I dont know the answer....but someone will .......i am putting in this post to hopefully help your topic to 'stay put".....I have no clue why it was deleted....most unusual....perhaps @wizardfromoz may be able to shed some light ?

Anyway....good luck....I will watch with interest
 
Thanks Condobloke!

I had another thought of what was causing this. Again just shooting in the dark but maybe it was libssl-dev? I typed sudo apt-get install libssl-dev and that was all. Not sure if there is an extra step to get it fully installed and maybe thats whats causing my problem? If not, just ignore this bit lol
 
  1. Update the package index: # sudo apt-get update

  2. Install libssl-dev deb package:
    # sudo apt-get install libssl-dev
from : HERE
 
Okay that worked for installing it. Unfortunately didn't fix my issue lol but we got that part out of the way because its necessary for the program apparently. Going to restart the pc and try again although I dont have much hope in it. lol
 
My ears are burning - who invoked the name of the Wizard?

0cd7RxV.gif


(Wizard appears in a puff of smoke)

G'day Redeye from another Aussie, and welcome :)

My thread got deleted shortly after posting. If this one gets deleted, could you tell me why so I can stop doing whatever you don't like? Thanks!

Not deleted, set aside for Approval ... occasionally a Post will trigger our site software into holding a Thread, usually to do with a URL (website address) being mentioned inside a quote or reply box.

Such was not the case here, so I am at a loss to account for it, regrets.

Your Original Post came across my (virtual) desk for approval when I came online a little while ago. Seeing nothing wrong with it, I approved it straight away.

It is restored, but it is in Networking, where you first placed it.

Given Brian (@Condobloke ) has responded to you, I am inclined to move from the other Thread to this one, relevant material that is not duplicated and then close off the other one, but then move THIS one to Networking.

Anybody remain un-confused?

Mate you said in the other

...Really hoping I can get a hand with this as its my livelihood and I live in the middle of nowhere!

Do be aware that despite our site name, we are not an official arm nor organ of LInux - just jagged the domain name early in the piece.

We are staffed and manned by happy volunteers who enjoy their Linux, and have varying levels of skills and knowledge in many areas. Also timezones are from around the world, so response times can be a little frustrating

Hope we can help :)

Chris Turner
wizardfromoz
 
I've just been going between this thread and your other one and I'm just trying to get up to speed with this.
=
The solution on other forum was to enter
proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE)

Then change dumpversion to dumpfullversion

When I enter that proc code i get this
bash: syntax error near unexpected token `('

If you're talking about this:

Then the instruction is to find the existing line of the script where the variable proc is assigned a value and change -dumpversion to -dumpfullversion.

If you did exactly that, you shouldn't be getting an error message, so unless I'm mistaken - it sounds like you've copy pasted that line of code somewhere inappropriate and have changed -dumpversion to -dumpfullversion.

Looking at the line of code itself - it looks like it's a python script - not a shell-script. It might be a snippet of python script that has been embedded inside the shellscript. So again, if you copy/pasted that line of code into a part of the script that is meant to be shellscript - that might explain the problem you are having.

Restore the makefile back to it's original state - then track-down the line of code where proc is assigned a value using subprocess.Popen and make the change that was in the instructions and see how you get on.

And again - I could be mistaken with my diagnosis - so apologies if I am incorrect, but I think this is what's going on!
 
UPDATE:
I've just downloaded the linux package for clockworkmod and taken a look at the installer.

The configure script is a python script - so I don't understand why you're getting an error from bash.
Did you just copy/paste that line of code into a terminal??

I can verify that if you open the configure script and go to line 325, change the word -dumpversion to -dumpfullversion - the configuration script will run properly without any errors!
 
Big thanks man! I get off work shortly so I'll play around with what you said. Everything you said is pretty much another language to me so I'll need to Google how to do all that lol but yes I just copied and pasted that into terminal. Forgive my ignorance. I'll update yall if I can manage to figure it out when I get home.
Also I didnt change the dumpversion in anything because like you said, I pasted it in the wrong place and got an error before being able to change it
 
Woohoo! made it through the configure part. For anyone who needs what was said above put in layman's terms, go to your clockworkmod folder then node folder. Click on the blue and yellow logo labeled "configure" and press ctrl F to word search. Enter dump and you will see what you need to change it to dumpfullversion. You can now do the ./configure.

but now I'm getting this. Also how do u guys put these logs into a smaller format? ill edit and do so if i can figure it out.

make -C out BUILDTYPE=Release V=1
make[1]: Entering directory '/home/dev/1/1/node/out'
g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DENABLE_DEBUGGER_SUPPORT' '-DV8_TARGET_ARCH_IA32' -I../deps/v8/src -Wall -pthread -m32 -fno-strict-aliasing -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-rtti -fno-exceptions -MMD -MF /home/dev/1/1/node/out/Release/.deps//home/dev/1/1/node/out/Release/obj.target/v8_base/deps/v8/src/accessors.o.d.raw -c -o /home/dev/1/1/node/out/Release/obj.target/v8_base/deps/v8/src/accessors.o ../deps/v8/src/accessors.cc
In file included from ../deps/v8/src/v8globals.h:32:0,
from ../deps/v8/src/v8.h:53,
from ../deps/v8/src/accessors.cc:28:
../deps/v8/src/v8utils.h: In function ‘void v8::internal::CopyWords(T*, T*, int)’:
../deps/v8/src/checks.h:251:22: warning: typedef ‘__StaticAssertTypedef__125’ locally defined but not used [-Wunused-local-typedefs]
SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
^
../deps/v8/src/checks.h:241:39: note: in definition of macro ‘SEMI_STATIC_JOIN_HELPER’
#define SEMI_STATIC_JOIN_HELPER(a, b) a##b
^
../deps/v8/src/checks.h:251:5: note: in expansion of macro ‘SEMI_STATIC_JOIN’
SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__)
^~~~~~~~~~~~~~~~
../deps/v8/src/checks.h:283:30: note: in expansion of macro ‘STATIC_CHECK’
#define STATIC_ASSERT(test) STATIC_CHECK(test)
^~~~~~~~~~~~
../deps/v8/src/v8utils.h:125:3: note: in expansion of macro ‘STATIC_ASSERT’
STATIC_ASSERT(sizeof(T) == kPointerSize);
^~~~~~~~~~~~~
In file included from ../deps/v8/src/elements.h:32:0,
from ../deps/v8/src/objects-inl.h:38,
from ../deps/v8/src/v8.h:60,
from ../deps/v8/src/accessors.cc:28:
../deps/v8/src/objects.h: In member function ‘uint32_t v8::internal::HashTable<Shape, Key>::Hash(Key)’:
../deps/v8/src/objects.h:2769:20: warning: invalid use of incomplete type ‘class v8::internal::Heap’
GetHeap()->HashSeed());
^~
In file included from ../deps/v8/src/v8.h:52:0,
from ../deps/v8/src/accessors.cc:28:
../deps/v8/src/../include/v8.h:119:7: note: forward declaration of ‘class v8::internal::Heap’
class Heap;
^~~~
In file included from ../deps/v8/src/elements.h:32:0,
from ../deps/v8/src/objects-inl.h:38,
from ../deps/v8/src/v8.h:60,
from ../deps/v8/src/accessors.cc:28:
../deps/v8/src/objects.h: In member function ‘uint32_t v8::internal::HashTable<Shape, Key>::HashForObject(Key, v8::internal::Object*)’:
../deps/v8/src/objects.h:2778:20: warning: invalid use of incomplete type ‘class v8::internal::Heap’
GetHeap()->HashSeed(), object);
^~
In file included from ../deps/v8/src/v8.h:52:0,
from ../deps/v8/src/accessors.cc:28:
../deps/v8/src/../include/v8.h:119:7: note: forward declaration of ‘class v8::internal::Heap’
class Heap;
^~~~
In file included from ../deps/v8/src/elements.h:32:0,
from ../deps/v8/src/objects-inl.h:38,
from ../deps/v8/src/v8.h:60,
from ../deps/v8/src/accessors.cc:28:
../deps/v8/src/objects.h: At global scope:
../deps/v8/src/objects.h:5017:44: error: left operand of shift expression ‘(-1 << 3)’ is negative [-fpermissive]
static const int kElementsKindMask = (-1 << kElementsKindShift) &
~~~~^~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/objects.h:7152:36: error: left operand of shift expression ‘(-8 << 26)’ is negative [-fpermissive]
(~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
deps/v8/tools/gyp/v8_base.target.mk:211: recipe for target '/home/dev/1/1/node/out/Release/obj.target/v8_base/deps/v8/src/accessors.o' failed
make[1]: *** [/home/dev/1/1/node/out/Release/obj.target/v8_base/deps/v8/src/accessors.o] Error 1
make[1]: Leaving directory '/home/dev/1/1/node/out'
Makefile:26: recipe for target 'node' failed
make: *** [node] Error 2
 
So I'm kind of winging it from quick google research. It said I need to compile node.js so i typed rhino node.js and receive this error

dev@dev-Presario-CQ57-Notebook-PC:~/1/1/node$ rhino node.js
js: Couldn't read source file "node.js": node.js (No such file or directory).
 
So I did sudo apt-get install nodejs but still no resolution. I think this is my stopping point till someone can chime in. Definitely in over my head here haha
 
A lot of those messages are warnings from the c++ compiler (gcc/g++) - which are not really anything for you to worry about. They are potential defects in the code, that the developer should probably address, but they won't stop the program from building.

The few error messages that are actual errors - that are preventing the program from compiling, mention using the -fpermissive flag.

The -fpermissive flag is a bit of a hack that allows newer versions of gcc to compile older code. Code which uses dodgy/outdated programming practices that were allowed in previous versions of gcc.

Ideally - the errors that are being thrown should be fixed properly in the code by the developers, to allow the code to be compiled cleanly in newer versions of gcc.

But until then - in order to get past those errors, and to allow the program to compile - adding the -fpermissive flag to the cflags variable in one of the make-files is a workaround that could be used to get around this problem. With the -fpermissive flag set, those error messages will be downgraded to warnings and should allow the compiler to build the program.

So obviously, the developer must have wrote this for an older version of gcc, or using an older version of the C/C++ standard and there are some things that the developer is doing in the code that are considered unsafe, or no longer standard by the newer version of gcc.

When I get home from work this evening, I'll download the linux package for this program again. I'll have a go at building it myself and will get back to you on my findings.
 
Could I get away with installing an older version GCC? Not sure if that's how it works. I really appreciate your efforts in this. You have no idea how much ur saving me rn lol Now I know how my non mechanic friends feel. I'm like it's as easy as doing this and this and I then get blank stare haha
 
You could try installing an older version of gcc - but you shouldn't have to. The newer versions of gcc are backwards compatible with the older versions - it should just be a case of editing the build-system to either use the -fpermissive flag, or to set the -std flag to compile the code using a different version of the C/C++ standard.

BTW - I didn't get a chance to look at it last night, so I'll try to find time to take a look at it tonight.
 
No worries man. We all got busy lives! I'll see if I can look up how to do that when I get home as well.
 
Well I think we are at a dead end here. I'm buying a new laptop on Wednesday lol Thank you everyone for your time and effort. Many thanks!
 
Well Im at the same dead end and editing the .config didnt't work the trick. Any further insight here?
 

Members online


Latest posts

Top