Coder Social home page Coder Social logo

Comments (11)

crazyxman avatar crazyxman commented on June 5, 2024 1

Updated simdjson to version 0.2.1

from simdjson_php.

crazyxman avatar crazyxman commented on June 5, 2024

@lemire Thanks! I will update the native bindings.

from simdjson_php.

1ma avatar 1ma commented on June 5, 2024

I'm very interested in this update, especially the wider range of CPU support.

I tried to update the amalgamation files to 0.2.1 and submit a PR but ultimately I couldn't make it work.

from simdjson_php.

lemire avatar lemire commented on June 5, 2024

@1ma What was the issue?

Note: we made minor changes to the simdjson API.

from simdjson_php.

1ma avatar 1ma commented on June 5, 2024

Yup I saw one, ParsedJson::isValid() was renamed to ParsedJson::is_valid().

But I'm not fluent in C/C++, I don't have appropriate tooling for the language and after that I still had to make sense of these errors πŸ˜… https://gist.github.com/1ma/7c7329ff57c9b70b02ad81b326311d08

Moreover, in bindings.h and bindings.cpp there is an #ifdef __AVX2__ directive wrapping the whole content of the files that I guess that now should be removed or refactored somehow.

from simdjson_php.

lemire avatar lemire commented on June 5, 2024

Yes! We don’t require AVX anymore.

from simdjson_php.

1ma avatar 1ma commented on June 5, 2024

I cannot build the latest commit under Alpine Linux 3.10, getting these errors:

$ make
/bin/sh /root/simdjson_php/libtool --mode=compile cc  -I. -I/root/simdjson_php -DPHP_ATOM_INC -I/root/simdjson_php/include -I/root/simdjson_php/main -I/root/simdjson_php -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/simdjson_php/simdjson.c -o simdjson.lo 
mkdir .libs
 cc -I. -I/root/simdjson_php -DPHP_ATOM_INC -I/root/simdjson_php/include -I/root/simdjson_php/main -I/root/simdjson_php -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/simdjson_php/simdjson.c  -fPIC -DPIC -o .libs/simdjson.o
In file included from /root/simdjson_php/simdjson.c:23:
/root/simdjson_php/src/bindings.h:25:1: error: unknown type name 'namespace'; did you mean 'isspace'?
 namespace simdjsonphp {
 ^~~~~~~~~
 isspace
/root/simdjson_php/src/bindings.h:25:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 namespace simdjsonphp {
                       ^
/root/simdjson_php/src/bindings.h:41:1: error: unknown type name 'bool'; did you mean '_Bool'?
 bool cplus_simdjson_isvalid(const char *json);
 ^~~~
 _Bool
/root/simdjson_php/simdjson.c:56:22: error: conflicting types for 'cplus_simdjson_isvalid'
 extern unsigned char cplus_simdjson_isvalid(const char *json);
                      ^~~~~~~~~~~~~~~~~~~~~~
In file included from /root/simdjson_php/simdjson.c:23:
/root/simdjson_php/src/bindings.h:41:6: note: previous declaration of 'cplus_simdjson_isvalid' was here
 bool cplus_simdjson_isvalid(const char *json);
      ^~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:193: simdjson.lo] Error 1

Commit a0e942d from May 29th builds fine.

If you want to try to reproduce, I started from a clean alpine:3.10 Docker container and only needed to install these packages: apk add git build-base php7-dev

from simdjson_php.

lemire avatar lemire commented on June 5, 2024

@1ma This looks like one is trying to compile C++ as if it were C... right?

from simdjson_php.

lemire avatar lemire commented on June 5, 2024

@1ma It might be useful to open a distinct issue regarding build problems?

from simdjson_php.

1ma avatar 1ma commented on June 5, 2024

You are right, sorry.

from simdjson_php.

lemire avatar lemire commented on June 5, 2024

I suggest we close this issue.

from simdjson_php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.