Code Monkey home page Code Monkey logo

Comments (4)

jan-wassenberg avatar jan-wassenberg commented on June 16, 2024

Hi, the error codes are simply line numbers, but it looks like your code is quite different.
On both main and dev, if (file_size_ != file_size) return __LINE__; should be line 218, not 155. Is the code modified?

I think the issue is that off_t on Android defaults to 32-bit. You can build with -D_FILE_OFFSET_BITS=64 which fixes it for 15c and above. We'll also change to lseek64, thanks for pointing this out :)

from gemma.cpp.

jan-wassenberg avatar jan-wassenberg commented on June 16, 2024

I think this is fixed now, please reopen if not.

from gemma.cpp.

urim85 avatar urim85 commented on June 16, 2024

It works well!!

But sentencepiece with add_definitions(-D_FILE_OFFSET_BITS=64) has an error.

/usr/lib/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/fstream:968:9: error: use of undeclared identifier 'fseeko'
if (fseeko(_file, __sp, SEEK_SET))

I put the definition like this

FetchContent_Declare(sentencepiece GIT_REPOSITORY https://github.com/google/sentencepiece GIT_TAG 53de76561cfc149d3c01037f0595669ad32a5e7c)
FetchContent_MakeAvailable(sentencepiece)

add_definitions(-D_FILE_OFFSET_BITS=64)

FetchContent_Declare(highway GIT_REPOSITORY https://github.com/google/highway.git GIT_TAG da250571a45826b21eebbddc1e50d0c1137dee5f)
FetchContent_MakeAvailable(highway)

Thank you very much!

from gemma.cpp.

jan-wassenberg avatar jan-wassenberg commented on June 16, 2024

Please help us out by searching for such error messages on the web :)
This one is mentioned in https://developer.android.com/ndk/guides/common-problems, it seems we have to raise minSdkVersion to 24.

from gemma.cpp.

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.