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

Compile errors on macOS systems #17

Open
Deadlyelder opened this issue Nov 15, 2018 · 3 comments
Open

Compile errors on macOS systems #17

Deadlyelder opened this issue Nov 15, 2018 · 3 comments

Comments

@Deadlyelder
Copy link

Issue

Compilation fails with multiple errors

Version used

From 1.0.4 till 1.0.7. All of them

Affected OS*

macOS {Seirra, High Seirra, Mojave}

Problem description

If a compilation is attempted of the source code for any version beginning from 1.0.4 using the normal sbt release command ends up with multiple errors (listed below) leading towards compilation fails. Two of the errors were resolved (as mentioned in the solution section).

  1. First error: Fakeroot not found,

  2. Second error: dpkg not found,

  3. Third error: Copmilation fails with the following error log

[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ExternalAgentListenerAgent.scala:40:9: ExternalAgentListener is already defined as class ExternalAgentListener
[error] object  ExternalAgentListener extends PropsCreator{
[error]         ^
[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ExternalAgentListenerAgent.scala:47:7: ExternalAgentListener is already defined as class ExternalAgentListener
[error] class ExternalAgentListener(
[error]       ^
[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ExternalAgentListenerAgent.scala:117:8: ExternalAgentHandler is already defined as class ExternalAgentHandler
[error] object ExternalAgentHandler{
[error]        ^
[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ExternalAgentListenerAgent.scala:130:7: ExternalAgentHandler is already defined as class ExternalAgentHandler
[error] class ExternalAgentHandler(
[error]       ^
[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ODFAgent.scala:21:8: ODFAgent is already defined as class ODFAgent
[error] object ODFAgent extends PropsCreator{
[error]        ^
[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ODFAgent.scala:27:7: ODFAgent is already defined as class ODFAgent
[error] class ODFAgent(
[error]       ^
[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ResponsibleScalaAgent.scala:16:8: ResponsibleScalaAgent is already defined as class ResponsibleScalaAgent
[error] object ResponsibleScalaAgent extends PropsCreator{
[error]        ^
[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ResponsibleScalaAgent.scala:28:7: ResponsibleScalaAgent is already defined as class ResponsibleScalaAgent
[error] class ResponsibleScalaAgent(
[error]       ^
[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ScalaAgent.scala:24:8: ScalaAgent is already defined as class ScalaAgent
[error] object ScalaAgent extends PropsCreator {
[error]        ^
[error] /Users/sankalp.ghatpande/O-MI-1.0.5/Agents/src/main/scala/agents/ScalaAgent.scala:52:7: ScalaAgent is already defined as class ScalaAgent
[error] class ScalaAgent(
[error]       ^
[error] 10 errors found
[error] (agents / Compile / compileIncremental) Compilation failed

Solutions attempted

  1. Solution is to download, compile and change permission of the binaries to 444. Alternative is to download via brew install fakeroot then within the installed binary, change permission and start the compile.

  2. Solution is to install the dpkg package that is missing in certain of the systems mentioned above.

  3. Unable to resolve this.

Is there anything that was recently changed which led to this? We were, afterall, able to compile successfully earlier on the macOS machines.

Thanks.

@TK009 TK009 changed the title Error on macOS systems Compile errors on macOS systems Nov 17, 2018
@TK009
Copy link
Contributor

TK009 commented Nov 17, 2018

Do you need the debian and/or rpm packages?
sbt release command creates all release packages as can be found on github releases page.

If you only need tar or zip release you can use sbt universal:packageBin. (I will update readme to include this.) This should fix problems with packager programs, but compilation problems with agents might be caused by something else. As a workaround, you can try to remove Agents directory.

@Deadlyelder
Copy link
Author

Yes, its true that we can grab the release (which works fine) but prefer to compile from source :)

Thanks for the solutions, I tried both of them; using the sbt universal:packageBin and removing the Agents without any success. The error this time is as follows:

[error] warning: Could not canonicalize hostname: bonfim
[error] warning: Package o-mi-node: invalid utf-8 encoding in Classdict: TrueType Font data, digitally signed, 19 tables, 1st "DSIG", 26 names, Macintosh, Digitized data copyright � 2010-2011, Google Corporation.Open SansItalic1.10;1ASC;OpenSans-Ital - Illegal byte sequence
[error] warning: Package o-mi-node: invalid utf-8 encoding in Classdict: TrueType Font data, digitally signed, 19 tables, 1st "DSIG", 26 names, Macintosh, Digitized data copyright � 2010-2011, Google Corporation.Open SansBold1.10;1ASC;OpenSans-BoldOp - Illegal byte sequence
[error] warning: Package o-mi-node: invalid utf-8 encoding in Classdict: TrueType Font data, digitally signed, 19 tables, 1st "DSIG", 26 names, Macintosh, Digitized data copyright � 2010-2011, Google Corporation.Open SansBold Italic1.10;1ASC;OpenSans - Illegal byte sequence
[info] Wrote: /Users/sankalp.ghatpande/O-MI-1.0.5/target/rpm/RPMS/noarch/o-mi-node-1.0.5-1.noarch.rpm
[info] Executing(%clean): /bin/sh -e /var/folders/t6/nr6x8cw54972mwyp008x_pw18tq0vn/T/sbt_7f7d8ad9/rpm-tmp.OQZyGF
[error] + umask 022
[error] + cd /Users/sankalp.ghatpande/O-MI-1.0.5/target/rpm/BUILD
[error] + /bin/rm -rf /Users/sankalp.ghatpande/O-MI-1.0.5/target/rpm/buildroot
[error] + exit 0

which seems to be imply system level issue?

After some tinkering over weekend which included removing all the dependencies and installing from scratch (including sbt), found what might be potentially a solution (if it was not part of the problem).
For macOS systems, delete the Agents and then get DMG rather than other formats using sbt universal:packageOsxDmg which seems to be working for couple of the versions that I was able to check.

May I suggest having a Known Issues and Workaround section in the readme? This issue along with the LevelDB one with its workaround will be helpful for others.

Thanks :)

@TK009
Copy link
Contributor

TK009 commented Nov 19, 2018

It somehow tries to make rpm package in your error message, which shouldn't happen in universal:packageBin. Despite the errors it actually succeeds (the line "[info] Wrote: /Users/.../o-mi-node-1.0.5-1.noarch.rpm"). The errors after don't seem to be critical, all of them come from Native Packager that we are using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants