Comments (17)
It's helpful to provide information about your environment. I would think at a minimum: What distro are you running? gcc version? i686 or x86_64?
from pugixml.
Please also specify the full command line that you use for compiling pugixml, in addition to the exact version of whatever compiler you're using (if you're using gcc or clang you can get it via 'gcc -v' or 'clang -v')
from pugixml.
Sorry, totally forgot. You are right, i used an older 32 bit mingw compiler.
from pugixml.
What's the specific version? I generally try to make pugixml compatible across all MinGW versions.
This error implies that limits.h is pre-C99. Since you're using MinGW it's probably detected as MSVC and thus is trying to use long long. I think I tested MinGW versions down to 3.4 but I'll double check.
from pugixml.
Should have been MinGW 32 bit Version 3.8 but it seems like there was something else wrong. I got it running now with MinGW nuwen 4.0 64 bit. I also had to enable C++11 support in Eclipse. Thanks for your help!
from pugixml.
As far as I can tell this is essentially an issue in MinGW 3.8.
My distributions of MinGW 3.4 and MinGW 4+ all have the following guards for LLONG_MIN/etc. declarations:
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined(__STRICT_ANSI__)
So regardless of STRICT_ANSI mode (activated automatically when you specify -std= option) you'll get the definitions.
MinGW 3.8 headers I can find on SourceForge do something else:
#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
Which is very wrong (violates C99 standard). Here's a thread with the same issue AFAICT: http://compgroups.net/comp.lang.c/long-long/711656
from pugixml.
Based on this thread maybe this is not even related to the version of MinGW as much as the distribution - looks like the headers can come from different packages or something. Why is this such a mess :-/
from pugixml.
Ok, MinGW does not define _MSC_VER. I can sort-of reproduce this by building with these buggy headers from SourceForge if I specify -DPUGIXML_HAS_LONG_LONG explicitly - if I don't I can't reproduce this since I can't use -std=c++11 (compiler is too old for that). So you must have had a pretty recent MinGW compiler (C++11-aware) with headers that don't know about LLONG_MAX in strict ANSI mode (not C++11-aware).
from pugixml.
As you pointed out correctly the problem is not only dependent on the MinGW Version. I was playing around with different distros (nuwen, 64bit and so on). I will look into the issue further when I got time, as I would like to use the nuwen distro. Thanks
from pugixml.
Since I have applied the workaround in 2cf599b, you should be able to use the latest master without issues.
from pugixml.
I just stumbled on the same error here. Didn't dig into the problem, but resolved including instead of <limits.h> in pugixml.cpp. compiler is GCC 6.3.0 built from sources myself. Strange enough, this problem disappears using default OS compiler (Ubuntu 5.4.0).
Any hint about how to provide more insightful data for you to process?
from pugixml.
Doh, for some reason github postprocessing cuts out my "climits" inside brackets but I think you get the point... :)
from pugixml.
@seatedscribe Would you mind uploading the limits.h file that pugixml.cpp includes somewhere so that I can take a look at it? You can get the precise path by compiling pugixml with -MD flag, e.g.
gcc pugixml.cpp -c -MD && cat pugixml.d | grep limits
from pugixml.
I also had a report before about pugixml not compiling correctly on a custom-built GCC but in that case the headers installed by gcc were just broken - specifically, assert.h installed to /usr/local/include/asset.h couldn't be compiled for whatever reason.
from pugixml.
Well, compiler throws the error so it doesn't produce any output file.
I tried with -H and the only interesting file is located at use/local/lib/GCC/x86_64-pc-linux-gnu/6.3.0/include-fixed/limits.h. I will upload if you think could help.
Only way is compiling with climits header, but I guess it's not what you want.
How can we get the include path then?
from pugixml.
Ah right, -MD requires the compilation to succeed :( If that's the case you could use -E in a similar fashion:
gcc pugixml.cpp -E | grep limits.h
from pugixml.
That command worked.
I confirm the path of the file is
/usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include-fixed/limits.h
I will upload it tomorrow, but the name of folder is quite odd :/
from pugixml.
Related Issues (20)
- Empty text childs increase XML file size HOT 5
- xml_node_iterator should satisfy at least std::input_or_output_iterator concept HOT 3
- Assertion fails during number-to-string conversion if wrong C locale is set (non-MSVC) HOT 1
- Support std::filesystem::path HOT 2
- Version 1.14 HOT 1
- Can you add the ability to access child nodes using index? HOT 1
- PUGIXML_WCHAR_MODE and error messages. HOT 1
- add xml_node_type_str function for debugging and application logging HOT 3
- option to join multiple CDATA sections into one when parsing HOT 2
- parse_embed_pcdata and parse_merge_pcdata don't play together HOT 2
- Unexpected #endif in line 13201 with precompilation in a pch.h file HOT 2
- XML Canonicalization: as an option, allow parsing eol's into the document model (as PCDATA holding those) HOT 2
- Warning when building 1.14 in x86 on Clang HOT 3
- Position of the parse result offset in case of status_bad_start_element
- Error in handling loading errors example HOT 1
- Incorrect result of xml_document::load_file -"File was not found" HOT 2
- Question: I have made my own case insensitive version, is that ok? HOT 2
- Serilisation HOT 4
- pugi::xml_node and std::ranges, maybe a documentation request HOT 2
- call function xml_node::empty() always return false in anyway HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pugixml.