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

add the marked-up object compiler, moc, package to conan center #5832

Closed
wants to merge 20 commits into from

Conversation

zuut
Copy link

@zuut zuut commented Jun 9, 2021

Specify library name and version: moc/0.9.3

Moc, for marked-up object compiler, is an IDL-like code generator developed in the early 1990s and is used to generate code, sql and other text files from annotated data model. see: https://github.com/zuut/moc


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@conan-center-bot

This comment has been minimized.

recipes/moc/all/conandata.yml Outdated Show resolved Hide resolved
recipes/moc/all/conandata.yml Outdated Show resolved Hide resolved
recipes/moc/all/.gitignore Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/check_recipe.sh Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@SpaceIm
Copy link
Contributor

SpaceIm commented Jun 9, 2021

Now you need to properly set cpp_info.names in package_info()

@zuut
Copy link
Author

zuut commented Jun 9, 2021

Failure in build 6 (dc45d53bfdfe70247127faccdc0eaea7ef1eacc8):

* **moc/0.9.401@:**
  CI failed to create some packages ([All logs](https://c3i.jfrog.io/c3i/misc/summary.html?json=https://c3i.jfrog.io/c3i/misc/logs/pr/5832/6/moc/0.9.401//summary.json))
  Logs for packageID `66743291b51336759c453bb6d0a93c24731a4cd0`:
  ```
  [settings]
  arch=x86_64
  arch_build=x86_64
  build_type=Debug
  compiler=apple-clang
  compiler.libcxx=libc++
  compiler.version=10.0
  os=Macos
  os_build=Macos
  ```
  
  
      
        
      
  
        
      
  
      
    
  ```
  [...]
  ----Running------
  > cmake --build '/Users/jenkins/w/BuildSingleReference@6/conan-center-index/recipes/moc/all/test_package/build/d5dd16198951de31b02637187662ccfc77c7f43e' '--' '-j4'
  -----------------
  [ 33%] /Users/jenkins/w/BuildSingleReference@6/conan-center-index/recipes/moc/all/test_package
  CMake Warning at CMakeLists.txt:8 (find_package):
    By not providing "FindMoc.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "Moc", but
    CMake did not find one.
  
    Could not find a package configuration file provided by "Moc" with any of
    the following names:
  
      MocConfig.cmake
      moc-config.cmake
  
    Add the installation prefix of "Moc" to CMAKE_PREFIX_PATH or set "Moc_DIR"
    to a directory containing one of the above files.  If "Moc" provides a
    separate development package or SDK, be sure it has been installed.
  
  
  CONAN_MOC_ROOT: /Users/jenkins/w/BuildSingleReference@6/.conan/data/moc/0.9.401/_/_/package/66743291b51336759c453bb6d0a93c24731a4cd0
  MOC_TOOL: /Users/jenkins/w/BuildSingleReference@6/.conan/data/moc/0.9.401/_/_/package/66743291b51336759c453bb6d0a93c24731a4cd0/bin/moc
  CMake Warning:
    Manually-specified variables were not used by the project:
  
      CMAKE_EXPORT_NO_PACKAGE_REGISTRY
      CMAKE_INSTALL_BINDIR
      CMAKE_INSTALL_DATAROOTDIR
      CMAKE_INSTALL_INCLUDEDIR
      CMAKE_INSTALL_LIBDIR
      CMAKE_INSTALL_LIBEXECDIR
      CMAKE_INSTALL_OLDINCLUDEDIR
      CMAKE_INSTALL_SBINDIR
      MOC_ROOT
  
  
  /Users/jenkins/w/BuildSingleReference@6/conan-center-index/recipes/moc/all/test_package/test_app.moc:4: Error in /Users/jenkins/w/BuildSingleReference@6/.conan/data/moc/0.9.401/_/_/package/66743291b51336759c453bb6d0a93c24731a4cd0/bin/moc input: processing input Class("Address")
  /Users/jenkins/w/BuildSingleReference@6/conan-center-index/recipes/moc/all/test_package/test_app.tpl:79: ERROR: Expected variable of the form @(name) in input '6/conan-center-index/recipes/moc/all/test_package/build/d5dd16198951de31b02637187662ccfc77c7f43e/genSrc/include/bizobj/address/Address.h'
  /Users/jenkins/w/BuildSingleReference@6/conan-center-index/recipes/moc/all/test_package/test_app.moc:4: Error in /Users/jenkins/w/BuildSingleReference@6/.conan/data/moc/0.9.401/_/_/package/66743291b51336759c453bb6d0a93c24731a4cd0/bin/moc input: processing input Class("Address")
  /Users/jenkins/w/BuildSingleReference@6/conan-center-index/recipes/moc/all/test_package/test_app.tpl:149: ERROR: Expected variable of the form @(name) in input '6/conan-center-index/recipes/moc/all/test_package/build/d5dd16198951de31b02637187662ccfc77c7f43e/genSrc/src/bizobj/address/Address.cpp'
  /Users/jenkins/w/BuildSingleReference@6/conan-center-index/recipes/moc/all/test_package/test_app.moc:4: Error in /Users/jenkins/w/BuildSingleReference@6/.conan/data/moc/0.9.401/_/_/package/66743291b51336759c453bb6d0a93c24731a4cd0/bin/moc input: processing input Class("Address")
  /Users/jenkins/w/BuildSingleReference@6/conan-center-index/recipes/moc/all/test_package/test_app.tpl:176: ERROR: Expected variable of the form @(name) in input '6/conan-center-index/recipes/moc/all/test_package/build/d5dd16198951de31b02637187662ccfc77c7f43e/genSrc/src/bizobj/address/Address.ddl.sample'
  /Users/jenkins/w/BuildSingleReference@6/.conan/data/moc/0.9.401/_/_/package/66743291b51336759c453bb6d0a93c24731a4cd0/bin/moc detected 3 errors during output generation
  make[2]: *** [genSrc/test_app.sequence] Error 15
  make[1]: *** [CMakeFiles/test_package.dir/all] Error 2
  make: *** [all] Error 2
  m4/1.4.18: WARN: Lib folder doesn't exist, can't collect libraries: /Users/jenkins/w/BuildSingleReference@6/.conan/data/m4/1.4.18/_/_/package/907cb07dbeb8f7bacd51a5119560f14986d21b20/lib
  ERROR: moc/0.9.401 (test package): Error in build() method, line 37
  	cmake.build()
  	ConanException: Error 2 while executing cmake --build '/Users/jenkins/w/BuildSingleReference@6/conan-center-index/recipes/moc/all/test_package/build/d5dd16198951de31b02637187662ccfc77c7f43e' '--' '-j4'
  ```

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

Now you need to properly set cpp_info.names in package_info()
@SpaceIm - can you tell me what is incorrect?

@conan-center-bot

This comment has been minimized.

recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Show resolved Hide resolved
@conan-center-bot

This comment has been minimized.

recipes/moc/all/conanfile.py Show resolved Hide resolved
recipes/moc/all/conanfile.py Show resolved Hide resolved
recipes/moc/all/conanfile.py Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Show resolved Hide resolved
recipes/moc/all/test_package/test_app.tpl Show resolved Hide resolved
recipes/moc/all/conanfile.py Outdated Show resolved Hide resolved
recipes/moc/all/conanfile.py Show resolved Hide resolved
@ghost
Copy link

ghost commented Jun 13, 2021

I detected other pull requests that are modifying moc/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

@prince-chrismc prince-chrismc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recipes/moc/all/conanfile.py Show resolved Hide resolved
recipes/moc/all/conanfile.py Show resolved Hide resolved
recipes/moc/all/conanfile.py Show resolved Hide resolved
Comment on lines +1 to +9
typedef char* String;
typedef int integer;
typedef long Long;

#include "bizobj/address/Address.h"

int main(int argc, char **argv) {
Address address;
}
Copy link
Contributor

@SpaceIm SpaceIm Jun 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it test link to uf library? It's the only one I see under lib/uf folder. Since this folder was not added to of cpp_info.libdirs, I'm wondering if cpp_info.libs is not empty...

Why upstream CMakeLists install this library in this subfolder instead of lib folder directly?

Comment on lines +91 to +92
self.cpp_info.builddirs.append(join("lib", "moc"))
self.cpp_info.builddirs.append(join("lib", "uf"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.cpp_info.builddirs.append(join("lib", "moc"))
self.cpp_info.builddirs.append(join("lib", "uf"))

Those folders contain CMake target files, they shouldn't be packaged

def package(self):
cmake = self._configure_cmake()
cmake.install()
tools.remove_files_by_mask(join(self.package_folder, "lib"), "*-config.cmake")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tools.remove_files_by_mask(join(self.package_folder, "lib"), "*-config.cmake")
tools.rmdir(join(self.package_folder, "lib", "moc"))
tools.remove_files_by_mask(join(self.package_folder, "lib", "uf"), "*.cmake")

From what I see in installation layout:

-- Install configuration: "Debug"
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/bin/moc
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/lib/moc/moc-targets.cmake
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/lib/moc/moc-targets-debug.cmake
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/lib/moc/moc-config.cmake
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/lib/cmake/Moc.cmake
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/lib/cmake/BisonFlex.cmake
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/lib/uf/libuf.a
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/lib/uf/uf-targets.cmake
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/lib/uf/uf-targets-debug.cmake
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/generic.h
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/ufAll.h
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/ufDate.h
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/ufDef.h
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/ufFileNm.h
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/ufIHshT.h
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/ufList.h
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/ufPtr.h
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/ufSHshT.h
-- Installing: /home/conan/w/BuildSingleReference/.conan/data/moc/0.9.401/_/_/package/5ab7aa3bc61b93e1b46714a0ee54d9a856dbe3b6/include/ufString.h

@conan-center-bot
Copy link
Collaborator

All green in build 20 (350e450285702466ea9028d65f886fe34af6b78f):

  • moc/0.9.401@:
    All packages built successfully! (All logs)

@stale
Copy link

stale bot commented Jul 28, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 28, 2021
@stale
Copy link

stale bot commented Aug 27, 2021

This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.

@stale stale bot closed this Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants