Giter Site home page Giter Site logo

Comments (4)

marcastel avatar marcastel commented on May 31, 2024

Hello, just bumped into this... if you're willing to use GNU extensions, here's a permanent fix:

UNAME = $(shell uname -s)

ifeq ($(UNAME),Darwin)
	LDLIBS   += -lm -ll
else
	LDLIBS   += -lm -lfl
endif

Here's the modified Makefile.

from pcalc.

vapier avatar vapier commented on May 31, 2024

does macOS use flex and bison by default ? or are you changing those as well ?

it's a bit odd if macOS provided flex but not -lfl.

from pcalc.

marcastel avatar marcastel commented on May 31, 2024

I have /usr/bin/flex (version flex 2.5.35 Apple(flex-31)). Don't have a vanilla macOS to check right now. I am assuming it is part of the Xcode command line tools that one installs with xcode-select --install.

No bison by default. Compile from GNU source or install with homebrew or macports.

As for the oddness, I don't have the mileage to answer. MacOS being of BSD descent, I would assume this to be historical in the System V vs. BSD race of the 80s (i.e. lex and yacc vs flex and Berkeley yacc).

from pcalc.

vapier avatar vapier commented on May 31, 2024

the fix was embarrassingly easier to pull off. just force it to a compile-time constant and don't link anything in at all.

from pcalc.

Related Issues (9)

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.