Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cc1plus: error: include: Value too large for defined data type when compiling with g++

Tags:

I am making a project that should compile on Windows and Linux. I have made the project in Visual Studio and then made a makefile for linux. I created all the files in Windows with VS.

It compiles and runs perfectly in VS but when I run the makefile and it runs g++ I get

$ g++ -c -I include -o obj/Linux_x86/Server.obj src/Server.cpp cc1plus: error: include: Value too large for defined data type cc1plus: error: src/Server.cpp: Value too large for defined data type 

The code is nothing more than a Hello World atm. I just wanted to make sure that everything was working before I started development. I have tried searching but to no avail.

Any help would be appreciated.

like image 672
A Jackson Avatar asked Mar 13 '10 15:03

A Jackson


2 Answers

I have found a solution on Ubuntu at least. I, like you have noticed that the error only occurs on mounted samba shares - it seems to come from g++ 'stat'ing the file, the inode returns a very large value.

When mounting the share add ,nounix,noserverino to the options, ie:

mount -t cifs -o user=me,pass=secret,nounix,noserverino //server/share /mount 

I found the info at http://bbs.archlinux.org/viewtopic.php?id=85999

like image 90
Paul Ridgway Avatar answered Nov 03 '22 22:11

Paul Ridgway


I had similar problem. I compiled a project in a CIFS mounted samba share. With one Linux kernel the compilation was done, but using an other Linux kernel (2.6.32.5), I got similar error message: "Value too large for defined data type". When I used the proposed "nounix,noserverino" CIFS mounting option, the problem was fixed. So in that case there is a problem with CIFS mounting, so the error message is misleading, as there are no big files.

like image 41
Laszlo Avatar answered Nov 03 '22 21:11

Laszlo