Swift package manager error: NoSources - linux

I am adding a dependency Package, and I am getting this error at build time:
error: NoSources("[...]/Tests/TestResources")
Please tell me how to get past this error. Is there a way to instruct SPM not to go into the Tests for a specific dependency? A package-specific exclude: [] statement or something.
$ swift --version
Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3de75)
Target: x86_64-unknown-linux-gnu
Thank you!

You have exclude directive in Package.swift - https://github.com/apple/swift-package-manager/blob/master/Documentation/Package.swift.md
It seems you are using the snapshot of swift of March 1st, there is a defect in this version regarding excluding files in Tests https://bugs.swift.org/browse/SR-864. It is solved in the later versions, so you can switch to a newer version, the last one is of 24-th of March.
As a temporarily workaround, if you still want to use your current version of swift, you can just move TestResources out of Test directory.

Related

Node.js module "fibers" not taking the correct version

I'm pretty new to node.js and its package management system and its require. I'm having trouble with the following runtime error I'm getting after having installed a bunch of packages with npm install:
ERROR: Couldn't initialise framework "wdio-mocha-framework".
Error: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
(required by <path>.../node_modules/fibers/bin/linux-ia32-v8-5.0/fibers.node)
at Error (native)
My understanding of the error is that the binary fibers.node was compiled with a newer libstdc++ than the one available at runtime.
It appears to me like the npm install did compile a fibers.node:
> fibers#1.0.13 install <path>.../node_modules/fibers
> node build.js || nodejs build.js
make[1]: Entering directory `<path>.../node_modules/fibers/build'
<snip some output, including warnings, here that I don't deem relevant>
Installed in `<path>.../node_modules/fibers/bin/linux-ia32-v8-3.14/fibers.node`
However, I see that the fibers.node that is throwing the error at runtime is not the same one as was compiled, and I assume that's the source of the problem.
Compiled:
.../linux-ia32-v8-3.14/fibers.node
Used at runtime and fails:
.../linux-ia32-v8-5.0/fibers.node
So I'm guessing and hoping that if I could convince wdio-mocha-framework to use the locally-compiled fibers.node, it would work. My questions are thus:
Would that fix it?
If so, how do I achieve that?
If not, what's the correct direction to take to further understand and fix this error? Perhaps instead of getting 3.14 to be used at runtime, I should be convincing 5.0 to be compiled at install-time? Or ... other?
Your help is most sincerely appreciated.
Update/Edit:
I think I solved this on my own, in case anyone ever finds this poor, dusty old question lying forgotten on the back of a shelf somewhere...
The problem was apparently due to multiple versions of node/node-gyp that were installed in my environment in parallel, and the build process, even though it was started with a newer version of node, was finding node-gyp in the $PATH and that's apparently what caused the old version of fibers to be built. At least, I think so.
Just had this problem recently. I managed to solve it just by uninstalling the current version of Node.JS (I had the most recent, in this case 9.5.0) and installing the recommended, in this case 8.9.4. and the issue is gone. hope this helps someone.

MyEclipse - The container 'Struts 1.1 Libraries' references non existing library

Some time my project in MyEclipse show me the following error on compilation. Sometime by restarting MyEclipse the error message disappear.
Can you please tell me why this error occurs ?
Error message :
The container 'Struts 1.1 Libraries' references non existing library 'C:\MyEclipse\.......\org.eclipse.osgi\bundles\16\1\.cp\data\1.1\lib\commons-beanutils.jar' ROMO_ETD Build path Build Path Problem
Thanks a lot.
Looks like you might be using an old unsupported release of MyEclipse, so one option would be to upgrade to the latest release. Another would be to run MyEclipse with the -clean argument, once. The argument is mentioned here (for the eclipse Juno release, but it's similar for earlier releases): http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.user/tasks/running_eclipse.htm?cp=0_3_0
Basically, the argument is added to the command line or to the top of the myeclipse.ini file, in the folder containing the myeclipse.exe file. The argument can be removed after the first launch, as it slows down the launch.

cabal could not find module snap.internal.http.server.exception

I have a Haskell desktop application that uses Snap. This application has been building for years now and is an everyday part of our fielded solution. I upgraded to a new development machine some months ago, running Windows 10 with version 7.10.3 of the GHC and 1.22.3.0 of the cabal library with 1.22.4.0 of cabal-install. I have installed version 0.9.8.0 of snap-core and version 0.9.5.1 of snap-server.
When I try and build my application in this environment, it get the following error:
Could not find module `Snap.Internal.Http.Server.Exception'
Perhaps you meant
Snap.Internal.Http.Server.Backend
Snap.Internal.Http.Server.Config
Snap.Internal.Http.Server.Date
I cannot find this module in Hackage. Did something change in Snap since I last built this code? Please, any advice will be appreciated.
Dave
P.S. Here are links to the output of the ghc-pkg list command and to the cabal file for this project.
http://zelda.designacourse.com/dave/ghc-pkg_list.txt
http://zelda.designacourse.com/dave/PreviewWrapper.cabal
With the help of, and gratitude to, epsilonhalbe we found a solution to this problem. I still do not know why the import of Snap.Internal.Http.Server.Exception started to throw an error from the compiler. However, removing that import and adding a type declaration to the variable now allows the code to build without error. i.e. catch ((_ :: IOException) -> return True).

Npm versioning - how does this edge case work?

Im trying to figure out how npm versioning works because im getting stuck on two invalid packages. Ref my other question. The module i need, serialport, get these packages invalid, "readable-stream" and "string_decoder". Serialport have downloaded this version:
readable-stream#1.0.27-1
Serialports dependency is
"readable-stream": "~1.0.2"
Readable-streams available versions are:
....
'1.0.26',
'1.0.27-1',
'1.0.31',
....
Which explains why 1.0.27-1 is picked. Because of the tilde and ~1.0.2, meaning that these three numbers have to exist in each version. Ref Jakob Mattsson´s simple article
readable-stream downloads
string_decoder#0.10.25-1
readable-stream again depends on
"string_decoder": "~0.10.x"
And string_decoders available versions are
....
'0.10.24',
'0.10.25-1',
'0.10.25',
'0.10.31',
'0.11.10-1'
....
How come that version is downloaded? Ref the article again, tilde means that it has to has 0.10 in the version number, and x is whatever exists?
Why is not string_decoder#0.10.31 chosen?
I believe my problem in question is related to prereleases that this extra dash is called. Im trying to gather facts to maybe seem if dependencies can get updated.
I recieved an answere on github, issue answer, thought i would share it with the rest who might wonder:
semver range checking is done semantically, not lexically, so 1.0.31 should match with npm#2:
% semver -r '~1.0.2' 1.0.26 1.0.27-1 1.0.31 1.0.26 1.0.31 I suspect that the behavior you're seeing is due to a bundledDependency included in the package tarball.
See Node app fails to run because of prerelease for a more detailed answer too why this happens.

How do I acquire the dependency 'gstreamer-sharp-1.0'?

I have decided I would like to contribute to an open source project, so I am attempting to contribute to Banshee media player. I have got the latest commit from GitHub. When I try to compile the code using ./autogen, I get the following error:
configure: error: Package requirements (gstreamer-sharp-1.0 >= 0.99.0) were not met:
No package 'gstreamer-sharp-1.0' found
I have searched for a package containing this dependency using:
apt-cache search gstreamer-sharp-1.0
But it returns nothing. Could somebody explain to me in detail how I can get this dependency? I am on Ubuntu 14.04 if that helps.
Here's the answer: "how to build banshee 2 9 1 on ubuntu 14 04" – user3159253
Thank you very much, I managed to build Banshee using that post. I had to use './autogen.sh --prefix=/usr' to build 'gstreamer-sharp-1.0'. I also had to build 'gudev-sharp-3.0' from source. – user2961850

Resources