Compilation error: expected primary-expression before token
See original GitHub issueI’m packaging pytorch_sparse for NixOS.
Bug description
Version: revision 2eff407270c271424ecaf6b8fbcaa7dc1564ffac (current master HEAD atm) When building I get many errors such as this one:
/build/pytorch_sparse-2eff407/csrc/cpu/spspmm_cpu.cpp:90:62: error: expected primary-expression before ‘>’ token
90 | valC_data = optional_valueC.value().data_ptr<scalar_t>();
| ^
Investigations
Could be an issue in my build setup but I don’t have much knowledge about this issue with gcc.
Seems related to this:
- https://stackoverflow.com/questions/5802077/strange-gcc-error-expected-primary-expression-before-token
- https://stackoverflow.com/questions/610245/where-and-why-do-i-have-to-put-the-template-and-typename-keywords
More
For the record:
torch-sparse-cuda = super.buildPythonPackage rec {
pname = "torch_sparse";
version = "0.6.0+cuda";
doCheck = false;
src = pkgs.fetchgit {
url = "https://github.com/rusty1s/pytorch_sparse";
rev = "2eff407270c271424ecaf6b8fbcaa7dc1564ffac";
sha256 = "1cpjwkxlah0xrv9gv4m3bmm837zv3x5lxqdp4b90nb0am4zf8dsh";
};
nativeBuildInputs = with pkgs; [
which
gcc
];
buildInputs = with super; [
pytestrunner
];
propagatedBuildInputs = with super; [
pytorch
];
};
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
error: expected primary-expression before ')' token (C)
I have tried to remove the argument 'SelectionneNonSelectionne', I obviously have the error message too few arguments, like this: error: too few ...
Read more >Expected Primary Expression Before: Fixing the Warning
The “expected primary expression before int” error means that you are trying to declare a variable of int data type in the wrong...
Read more >Cpp Common Compiler Errors with Explanations
List of the most common C++ errors students experience in Mimir Classroom and their explanations. ... expected primary-expression before ')' token.
Read more >expected primary-expression before ':' token : r/arduino - Reddit
So I'm trying to write this script for something and I cannot for the life of me figure out why it's throwing these...
Read more >Expected primary-expression before ')' token - Blynk Community
the rainbow function expects an argument to work. there is no variable passed to that function, this is why it gives that error....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just had the same problem and resolved it by upgrading pytorch to 1.5.0.
This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?