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

adding libpq/12.2 #1620

Merged
merged 11 commits into from Jun 16, 2020
Merged

adding libpq/12.2 #1620

merged 11 commits into from Jun 16, 2020

Conversation

prince-chrismc
Copy link
Contributor

fixes #1574

Specify library name and version: libpq/12.2

  • 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 conan-center-bot added the Bump version PR bumping version without recipe modifications label May 12, 2020
@conan-center-bot
Copy link
Collaborator

Some configurations of 'libpq/12.2' failed in build 1 (2a7c507359a7888808504c8e6d47602b1ec4e2df):

  • Linux x86_64, Release, gcc 5, libstdc++ . Options: libpq:shared-True
    • Hooks errors detected:
      • [HOOK - conan-center.py] pre_export(): ERROR: [CMAKE MINIMUM VERSION (KB-H028)] The CMake file '../co_pr_1620_1_0_0/recipes/libpq/all/test_package/CMakeLists.txt' must contain a minimum version declared at the beginning (e.g. cmake_minimum_required(VERSION 3.1.2)) (https://github.com/conan-io/conan-center-index/wiki/Error-Knowledge-Base#KB-H028)
      • [HOOK - conan-center.py] pre_export(): ERROR: [NO REQUIRES.ADD() (KB-H044)] The method 'self.requires.add()' is not allowed. Use 'self.requires()' instead. (https://github.com/conan-io/conan-center-index/wiki/Error-Knowledge-Base#KB-H044)
    • Log download
    • Log error Download
    • Profile
  • Access to all the logs

update openssl conan-io#696
@conan-center-bot conan-center-bot removed the Bump version PR bumping version without recipe modifications label May 12, 2020
@conan-center-bot
Copy link
Collaborator

Some configurations of 'libpq/12.2' failed in build 2 (a74d5ef789200e35417659657a7b96dd0aa813fa):

@prince-chrismc
Copy link
Contributor Author

Not very familiar with autotools. How does one resolve build order?

The build failed because:

/usr/bin/ld: cannot find -lpgport_shlib
collect2: error: ld returned 1 exit status
../../../src/Makefile.shlib:309: recipe for target 'libpq.so.5.12' failed
make: *** [libpq.so.5.12] Error 1
make: *** Waiting for unfinished jobs....

Which included:

rm -f libpgport_shlib.a
ar crs libpgport_shlib.a fls_shlib.o strlcat_shlib.o strlcpy_shlib.o getpeereid_shlib.o pg_crc32c_sse42_shlib.o pg_crc32c_sb8_shlib.o pg_crc32c_sse42_choose_shlib.o chklocale_shlib.o erand48_shlib.o inet_net_ntop_shlib.o noblock_shlib.o path_shlib.o pg_bitutils_shlib.o pgcheckdir_shlib.o pgmkdirp_shlib.o pgsleep_shlib.o pg_strong_random_shlib.o pgstrcasecmp_shlib.o pgstrsignal_shlib.o pqsignal_shlib.o qsort_shlib.o qsort_arg_shlib.o quotes_shlib.o snprintf_shlib.o sprompt_shlib.o strerror_shlib.o tar_shlib.o thread_shlib.o

Both are apart of

            with tools.chdir(os.path.join(self._source_subfolder, "src", "interfaces", "libpq")):
                autotools.make()

Was I just unlucky?

@madebr
Copy link
Contributor

madebr commented May 12, 2020

@prince-chrismc
By calling the different sub Makefiles seperately, we probably broke a dependency because the Makefile scripts assumed that its dependencies were already built.
I can fix this on my pc by doing the following

            autotools = self._configure_autotools()
            with tools.chdir(os.path.join(self._source_subfolder, "src", "backend")):
                autotools.make(target="generated-headers")
            with tools.chdir(os.path.join(self._source_subfolder, "src", "common")):
                autotools.make()
            with tools.chdir(os.path.join(self._source_subfolder, "src", "port")):  # NEW LINE
                autotools.make()                                                    # NEW LINE
            with tools.chdir(os.path.join(self._source_subfolder, "src", "include")):
                autotools.make()
            with tools.chdir(os.path.join(self._source_subfolder, "src", "interfaces", "libpq")):
                autotools.make()
            with tools.chdir(os.path.join(self._source_subfolder, "src", "bin", "pg_config")):
                autotools.make()

(running make in src/port)

Also, I saw that the resulting package contains both static and shared libraries.
We probably need to filter out the static and shared libraries.
This is also the case with libpq/11.5.
Because of the interdependencies, we probably need to drop the tools.collect_libs(self).
Also, the number of static libraries is different between 11.5 and 12.2...

Co-authored-by: Uilian Ries <uilianries@gmail.com>
@syoliver
Copy link
Contributor

@madebr @prince-chrismc I made a proposal to merge #1633 to this PR here : #3

syoliver and others added 2 commits May 15, 2020 01:25
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
@prince-chrismc
Copy link
Contributor Author

Thank you very much for helping. Nasty production bug killing me slowly

@conan-center-bot
Copy link
Collaborator

Some configurations of 'libpq/11.7' failed in build 3 (6b5edc550a2e0cd9b44cd8810c265290300fe894):

@prince-chrismc
Copy link
Contributor Author

ERROR: Unserializable object <conans.model.build_info.Component object at 0x7f11b4edc510> of type <class 'conans.model.build_info.Component'>

Seems like the usage of components may be an issue in the pipeline

@prince-chrismc
Copy link
Contributor Author

Might be conan-io/conan#6966 which was released ~24hrs ago.

@madebr
Copy link
Contributor

madebr commented May 15, 2020

Indeed, same as #1541 (comment).
Let's restart this in a day or two.

@uilianries
Copy link
Member

Unfortunately, the Conan version upgrade is not executed automatically, that's why sometimes you see errors from early versions.

@danimtb
Copy link
Member

danimtb commented May 20, 2020

You might be interested on this: https://github.com/conan-io/conan-center-index/wiki/Deployment-Changelog#14-may-2020---1552-cest

Unfortunately, there is still no sync between Linux containers and the Linux and Mac agents but we are working on it! 😄

@conan-center-bot
Copy link
Collaborator

Some configurations of 'libpq/11.7' failed in build 4 (6b5edc550a2e0cd9b44cd8810c265290300fe894):

@conan-center-bot
Copy link
Collaborator

All green in build 5 (6b5edc550a2e0cd9b44cd8810c265290300fe894)! 😊

uilianries
uilianries previously approved these changes May 20, 2020
@uilianries uilianries requested review from danimtb and SSE4 May 20, 2020 12:40
SSE4
SSE4 previously approved these changes May 21, 2020
@prince-chrismc prince-chrismc dismissed stale reviews from SSE4 and uilianries via 4e8f429 June 3, 2020 12:10
@conan-center-bot
Copy link
Collaborator

All green in build 6 (4e8f4298b26f7c990dcbcb4ddfdc79d6e2ed7ec0)! 😊

@danimtb
Copy link
Member

danimtb commented Jun 4, 2020

@prince-chrismc nice work there with components! Out of curiosity, do those components have a dedicated target in cmake? Is there any documentation of the library where I can check them?

I think it will be interesting to try to mimic the CMake target names in that case as well

@prince-chrismc
Copy link
Contributor Author

I haven't a clue! I thought this was an easy bump version!

@syoliver and @madebr did all the heavy lifting ❤️

From the quick search I did reviewing their changes they do appear to be the correct targets from the original build script =) once 1.26 is out this would be a great test for the new components feature.

The only caveat is that the c make module from kitware does not expose individual targets.

@tomlankhorst
Copy link

Is there a way to test this recipe locally already?

@prince-chrismc
Copy link
Contributor Author

Is there a way to test this recipe locally already?

Of Course!

If you clone the repo, cd to recipes/libpq/all run conan create . 1.12.0@ you will have a local copy!

@prince-chrismc
Copy link
Contributor Author

once 1.26 is out this would be a great test for the new components feature

Took the time to test this, with Conan 1.26, you can use the official CMake module imported target 👍

@conan-center-bot
Copy link
Collaborator

All green in build 7 (f25ae11b6131f1ab7bc06a67d20b1d3845dfa0fe)! 😊

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

good job adding components!

@uilianries uilianries requested a review from SSE4 June 15, 2020 22:16
@SSE4 SSE4 merged commit 228fd30 into conan-io:master Jun 16, 2020
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

Successfully merging this pull request may close these issues.

[request] libpq/12.2
9 participants