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

Macchina.io Conan recipe #70

Open
uilianries opened this issue Oct 4, 2017 · 10 comments
Open

Macchina.io Conan recipe #70

uilianries opened this issue Oct 4, 2017 · 10 comments

Comments

@uilianries
Copy link
Contributor

Hi!

Would be nice to include Conan support for Macchina.io, as done for Poco project on conan-poco. This feature will help to build and distribute Macchina.io as a package.

In addition, I think this feature will help to improve some modules integrated in this project, such as OpenSSL and Poco, to be used as external packages. Other issues #54 #15 could be benefited by this feature as well.

I have a background with Conan recipes and would be a pleasure to help.

Regards!

@aleks-f
Copy link
Member

aleks-f commented Oct 4, 2017

Thnks @uilianries, by all means - please feel free to work on it and send pull request, we'll be happy to review and merge it. also, you may want to get in touch with @lasote, he is the conan master

@uilianries
Copy link
Contributor Author

uilianries commented Oct 4, 2017

Nice! I'll start soon.

@aleks-f
Copy link
Member

aleks-f commented Oct 5, 2017

cool, #53 would also be nice to have, if you are inclined to put in some effort there.

@uilianries
Copy link
Contributor Author

Great! I'll put in the list.

uilianries pushed a commit to uilianries/macchina.io that referenced this issue Oct 6, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
@uilianries
Copy link
Contributor Author

uilianries commented Oct 9, 2017

Hi again!

I have started to create the conan recipe here. It complains the release 0.7.0, but it can be re-used for develop branch also.

I found two problems that I can't figure out a good way to solve. Also, I read the documentation many times to find some solution.

  1. When I try to build using static_release or static_debug, I got an error from V8 Makefile, where there are no target for both configuration:
----Running------
> make '-s' 'DEFAULT_TARGET=static_release' 'V8_SNAPSHOT=1' -j4
-----------------
Building V8 for arch x64 with flags: library=shared i18nsupport=off werror=no snapshot=on 
make[2]: *** No rule to make target 'static_release', needed by 'v8install'.  Stop.
Makefile:271: recipe for target 'JS/V8-libexec' failed
make[1]: *** [JS/V8-libexec] Error 2

I inspected such Makefile and only shared is listed.

Does static is really supported for version 0.7.0?

  1. When I install macchina.io in a custom path e.g. /tmp/macchina-install, I can't execute macchina server directly, I need to copy libv8.so, macchina.pem and rootcert.pem. Also I need to change applicationDir in macchina.properties.
----Running------
> cd /tmp/macchina.io4I1CfO
>  LD_LIBRARY_PATH=${PWD}/lib bin/macchina --bundles=${PWD}/lib/bundles --config=${PWD}/etc/macchina.properties
-----------------
...
2017-10-09 17:44:26.464 [Error] osp.core.BundleLoader<0>: Failed to start bundle osp.web.server.secure: File not found: /tmp/macchina.io4I1CfO/bin/rootcert.pem
...
2017-10-09 17:44:26.469 [Error] osp.core.BundleLoader<0>: Failed to start bundle com.appinf.osp.js required by com.appinf.osp.js.data: Cannot load library: libv8.so: cannot open shared object file: No such file or directory

Does libv8.so should be copied to target lib directory?
Does roorcert.pem and macchina.pem should be copied to target bin directory? -- both are in etc
Should I need change applicationDir on macchina.properties ?

@aleks-f
Copy link
Member

aleks-f commented Oct 9, 2017

  1. only dynamic is fine - since it is a dynamic plugin framework, static linking does not really make sense

Does libv8.so should be copied to target lib directory?

yes, v8 changes rapidly, we want to stick with our own

Does roorcert.pem and macchina.pem should be copied to target bin directory?

I think yes - install default and then user can customize according to their needs

Should I need change applicationDir on macchina.properties ?

applicationDir is picked up automatically from the executable location

/cc @obiltschnig

@obiltschnig
Copy link
Member

application.dir and application.configDir are set automatically based on the location of the executable and the config file.

@obiltschnig
Copy link
Member

obiltschnig commented Oct 9, 2017

When you run installed macchina.io, you need to explicitly specify the path to the config file. E.g.:

$ bin/macchina --config=etc/macchina.properties

Depending on the platform, you may also need to set LD_LIBRARY_PATH to include the macchina.io lib and the codeCache dir. libv8.so is included in the com.appinf.osp.js_1.0.0.bndl bundle, so it will be extracted to the codeCache dir when macchina.io is first started. On some Linux distros it may be necessary to start macchina.io a second time after the codeCache has been populated.

@uilianries
Copy link
Contributor Author

Thanks for your quickly answer!

About libv8, if you don't need to apply any custom patch, I can create a conan recipe for it in the future -- we can solve all dependencies as modular packages in some point, just a plan

@obiltschnig
Copy link
Member

Right now we have three patches for V8. These are not macchina.io-specific, but rather make our rather ancient V8 version build with modern toolchains and some (ARM) cross toolchains.

There are two main reasons why we still rely on the old V8 version:

  1. The build system included with newer V8 releases basically sucks. For starters, it fetches its own toolchains (or rather, the Chromium toolchains) from a Google server, etc.).
  2. Its API have changed in incompatible ways. We have a branch that works with a newer V8 release, and we will move to that soon.

The current plan regarding V8 is to use the node.js sources and build system to build libv8.so. This will hopefully make it easier to stay up to date regarding V8.

@uilianries uilianries mentioned this issue Oct 18, 2017
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 4, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 4, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 4, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 4, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 4, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 4, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 4, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 5, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 5, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 5, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
uilianries pushed a commit to uilianries/macchina.io that referenced this issue Dec 5, 2017
- Created Conan recipe to build and deploy
  macchin.io as package
- Include package validation that start the service

Signed-off-by: Uilian Ries <uilian@khomp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants