Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mvn build of scala.core fails with error "File name too long" #9

Closed
bertvv opened this issue May 24, 2011 · 8 comments
Closed

mvn build of scala.core fails with error "File name too long" #9

bertvv opened this issue May 24, 2011 · 8 comments

Comments

@bertvv
Copy link

bertvv commented May 24, 2011

I fetched the latest revision of the repository and tried to do a mvn clean install. The compilation of scala.core failed with error message "File name too long" without more information (which file?). Adding -verbose to the scala compiler options reveiled that the error occurs in ast.ScalaAstVisitor:

[...]
[wrote 'ScalaAstVisitor$treeTraverser$$anonfun$org$netbeans$modules$scala$core$ast$ScalaAstVisitor$treeTraverser$$traverse$11' to /home/bert/nbscala/scala.core/target/classes/org/netbeans/modules/scala/core/ast/ScalaAstVisitor$treeTraverser$$anonfun$org$netbeans$modules$scala$core$ast$ScalaAstVisitor$treeTraverser$$traverse$11.class]
error: File name too long
one error found
@bertvv
Copy link
Author

bertvv commented May 24, 2011

Platform version info:

$ mvn -v
Apache Maven 2.2.1 (rdebian-4)
Java version: 1.6.0_24
Java home: /usr/lib/jvm/java-6-sun-1.6.0.24/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux" version: "2.6.35-28-generic-pae" arch: "i386" Family: "unix"

@dcaoyuan
Copy link
Owner

It seems you os's filesystem does not support longer file names? That's sad.

@bertvv
Copy link
Author

bertvv commented May 27, 2011

I did some more research, the bug is in eCryptfs which I use to encrypt my home directory. Sad, indeed...

See https://bugs.launchpad.net/ecryptfs/+bug/344878

Closing this issue...

@bertvv bertvv closed this as completed May 27, 2011
@scotte
Copy link

scotte commented Jun 23, 2012

It's not so much a bug in ecryptfs as it is a disagreement between ecryptfs and scala. There was a bug in ecryptfs where it did not correctly indicate max file name lengths. As of ubuntu 12.04 and derivatives, that bug is now fixed, but scala ignores that advice and continues to create outrageously long filenames - so now the bug is fully in scala's court.

@jakewins
Copy link

The ubuntu maintainers agree with @scotte:

Please do create new bugs when an application generates filenames that are too long to be stored in an eCryptfs mount. The application may be able to use the statfs() syscall to check the filename length limits of eCryptfs.

I'm not actually a Scala guy (I just need to compile a Scala project), so I don't know how the tooling space around Scala looks, but it seems odd that this bug is listed on the NetBeans Scala project. Shouldn't the scala compiler configure itself with statfs()?

It's important to note that this really is an error on Scalas part, the hard limit for file name length on an unencrypted ext3 is 254 bytes, which is not massively larger than the 112 byte limit of ecryptfs. If Scala wants to compile on linux systems, it will need to take the max file name size into account.

@Markovin
Copy link

Markovin commented Oct 1, 2012

Well, I got the same problem as very annoying and with no explanation as the file names have no visible illegal characters and are not too long and not copied or deleted and found good stuff at http://pathtoodeep.com/ and also over here. Thanks

@mjuhasz
Copy link

mjuhasz commented Oct 28, 2012

In Scala you can use the option "-Xmax-classfile-name " option to limit the maximum filename length for generated classes.

@csaltos
Copy link

csaltos commented Feb 6, 2015

The option -Xmax-classfile-name set to 110 safe my Scala builds against filename too long. THANKS !! 👍 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants