Giter Site home page Giter Site logo

Application build failed about gorm-adapter HOT 6 CLOSED

casbin avatar casbin commented on May 18, 2024
Application build failed

from gorm-adapter.

Comments (6)

hsluoyz avatar hsluoyz commented on May 18, 2024

It seems that this PR: 57a0c40 has caused this issue. @L1ghtman2k can you fix it?

from gorm-adapter.

L1ghtman2k avatar L1ghtman2k commented on May 18, 2024

@elissa2333 Have you started getting the above error only recently? In my setup I always had gcc on windows, so I have never encountered that issue. According to https://github.com/mattn/go-sqlite3#installation, the package requires gcc to be installed, since go-sqlite3 is cgo package

You can find the solution for windows here:
According to mattn/go-sqlite3#467

@hsluoyz, I am not sure if this could be labeled as bug, since that is a requirement of a library gorm depends on(Unless there are some workarounds around cgo libraries that doesn't require gcc).

from gorm-adapter.

hsluoyz avatar hsluoyz commented on May 18, 2024

@L1ghtman2k can we remove the dependency on: https://github.com/mattn/go-sqlite3 ? I know this adapter supports sqlite, but let's not add it to the code directly. Or comment it, people who need it can uncomment to enable the feature.

This is classified as a bug because Casbin is supposed to work on Windows, Linux, macOS without special setup like gcc or cgo. Looking forward to the PR!

from gorm-adapter.

L1ghtman2k avatar L1ghtman2k commented on May 18, 2024

Oh, got it. My impression was that @elissa2333 was trying to utilize sqlite library, I will make the PR

from gorm-adapter.

elissa2333 avatar elissa2333 commented on May 18, 2024

@elissa2333 Have you started getting the above error only recently? In my setup I always had gcc on windows, so I have never encountered that issue. According to https://github.com/mattn/go-sqlite3#installation, the package requires gcc to be installed, since go-sqlite3 is cgo package

You can find the solution for windows here:
According to mattn/go-sqlite3#467

@hsluoyz, I am not sure if this could be labeled as bug, since that is a requirement of a library gorm depends on(Unless there are some workarounds around cgo libraries that doesn't require gcc).

Thank you for your answer. Encountered an error while upgrading v3. My program only supports MySQL Postgres

from gorm-adapter.

hsluoyz avatar hsluoyz commented on May 18, 2024

@elissa2333 fixed by commit: 007a8c0

Released v3.0.2: https://github.com/casbin/gorm-adapter/releases/tag/v3.0.2

from gorm-adapter.

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.