Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issue on old PC #524

Closed
zoidy opened this issue Sep 25, 2020 · 10 comments
Closed

Compilation issue on old PC #524

zoidy opened this issue Sep 25, 2020 · 10 comments

Comments

@zoidy
Copy link
Contributor

zoidy commented Sep 25, 2020

By default, navidrome will not compile on my system. It must be because my computer is old but but I have managed to resolve the problem. However, I don't know if it will break the compilation on other systems which is why I haven't submitted a pull request. However I wanted to share my modification in case it could be added

  1. Compiler runs out of memory when compiling the ui. I was able to fix this by modifying ui/package.json
    "build": "react-scripts build", change to "build": "react-scripts --max-old-space-size=1492 build",
  2. The TagLib module causes compilation to fail with several errors related to unsupported functionality/syntax in scanner/metadata/taglib/taglib_parser.cpp
    Add the #cgo CPPFLAGS: -std=c++11 directive to scanner/metadata/taglib/taglib_parser.go
    With the above flag, I get some warnings but compilation succeeds and navidrome runs without issue I spoke too soon. The playlist is broken (the official release works just fine)
@deluan
Copy link
Member

deluan commented Sep 25, 2020

I'll test this changes and let you know. What is your the platform/OS/version?

@deluan
Copy link
Member

deluan commented Sep 25, 2020

The CPPFLAGS in taglib_parser should not influence in playlist behaviour.... Are you sure that was the problem?

@zoidy
Copy link
Contributor Author

zoidy commented Sep 25, 2020

The CPPFLAGS in taglib_parser should not influence in playlist behaviour.... Are you sure that was the problem?

Hmm, in that case, let me do some testing and I'll get back to you.

My server is running on Debian Jessie 32 bit.

@zoidy
Copy link
Contributor Author

zoidy commented Sep 26, 2020

After some testing, in regards to item 2 from my original issue, it seems like there was something wrong with my build. Cleaning up my local git repo and starting fresh fixed the playlist issue. I still needed to make the modifications I indicated though in order for it to compile successfully

@deluan
Copy link
Member

deluan commented Sep 26, 2020

Ah, ok. Well, for the first change I prefer to let the user change their environment with NODE_OPTIONS. Does that work for you?

For the second change (the c++11), I'll do some tests and let you know

@deluan
Copy link
Member

deluan commented Sep 26, 2020

Can you please confirm that using #cgo linux CPPFLAGS: -std=c++11 as the directive works? (note thelinux option)

@zoidy
Copy link
Contributor Author

zoidy commented Sep 26, 2020

Thanks I wasn't aware of NODE_OPTIONS, I will use that. And yes, the directive with the linux option also worked. Also, I replaced CPPFLAGS with CXXFLAGS and it got rid of the warnings

@deluan
Copy link
Member

deluan commented Sep 26, 2020

Cool! So final version is:

#cgo linux CXXFLAGS: -std=c++11

Right? Care to make a PR? :)

@deluan
Copy link
Member

deluan commented Sep 26, 2020

PR merged. Thanks!

@deluan deluan closed this as completed Sep 26, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants