radiorabe / centos-rpm-ocaml-fdkaac

CentOS RPM Specfile for ocaml-fdkaac
https://build.opensuse.org/project/show/home:radiorabe:liquidsoap
0 stars 0 forks source link

Installing ocaml-fdkaac installs a full ocaml development environment #1

Open hairmare opened 5 years ago

hairmare commented 5 years ago

This issue affects most of the centos-rpm-* packages but I currently only use those to build the static liquidsoap binary so it hasn't affected me yet.

Now that liquidsoap will start dynloading the aac module (https://github.com/radiorabe/centos-rpm-liquidsoap/pull/18 ) the fact that this installs the full ocaml dev environment is starting to be an issue.

This already builds a -devel package so I'm assuming that fixing this will mostly mean bringing the specfile up to date regarding the latest ocaml spec guidelines.

hairmare commented 5 years ago

It look like this dep is from this:

ocaml(Buffer) = 29acb19a28b900e41ca251c3107ecf7f for package: ocaml-fdkaac-0.2.1-1.x86_64

So it's not something I can "fix" but rather how dynlib in ocaml works.

tzumbrunnen commented 5 years ago

I'm surprised that installing ocaml-fdkaac installs a full ocaml development environment. this should not happen. example, for the latest Liquidsoap 1.3.3 in the Debian "unstable", they just install ocaml-fdkaac w/o the whole dev environment.

hairmare commented 5 years ago

I just did some testing, we might need to raise this upstream...

This is how dependency resolution looks on a fresh local build of the RPM:

--> Running transaction check
---> Package ocaml-fdkaac.x86_64 0:0.2.1-1 will be installed
--> Processing Dependency: ocaml(Buffer) = 29acb19a28b900e41ca251c3107ecf7f for package: ocaml-fdkaac-0.2.1-1.x86_64
--> Processing Dependency: ocaml(Callback) = dce408881d6ac6161453b15efba2e1b4 for package: ocaml-fdkaac-0.2.1-1.x86_64
--> Processing Dependency: ocaml(CamlinternalFormatBasics) = cbd5f2d6b649925222e1e9fb63b89db6 for package: ocaml-fdkaac-0.2.1-1.x86_64
--> Processing Dependency: ocaml(Pervasives) = 07ea9e20ae94d62c35cfecbe7d66d3ea for package: ocaml-fdkaac-0.2.1-1.x86_64
--> Processing Dependency: ocaml(Printexc) = c52add357b965824810ca2ed42d7bdef for package: ocaml-fdkaac-0.2.1-1.x86_64
--> Processing Dependency: ocaml(String) = 90043e0e1317e530d5640850963d44c0 for package: ocaml-fdkaac-0.2.1-1.x86_64
--> Processing Dependency: ocaml(runtime) = 4.05.0 for package: ocaml-fdkaac-0.2.1-1.x86_64
--> Processing Dependency: fdk-aac for package: ocaml-fdkaac-0.2.1-1.x86_64
--> Processing Dependency: libfdk-aac.so.1()(64bit) for package: ocaml-fdkaac-0.2.1-1.x86_64
--> Running transaction check
---> Package fdk-aac.x86_64 0:0.1.4-1 will be installed
---> Package ocaml-runtime.x86_64 0:4.05.0-6.el7 will be installed
--> Processing Dependency: ocaml(Longident) = e15e9be830b55a219eb87c150ff382fe for package: ocaml-runtime-4.05.0-6.el7.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: ocaml-runtime-4.05.0-6.el7.x86_64
--> Running transaction check
---> Package libX11.x86_64 0:1.6.5-2.el7 will be installed
--> Processing Dependency: libX11-common >= 1.6.5-2.el7 for package: libX11-1.6.5-2.el7.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.5-2.el7.x86_64
---> Package ocaml-compiler-libs.x86_64 0:4.05.0-6.el7 will be installed
--> Processing Dependency: ocaml = 4.05.0-6.el7 for package: ocaml-compiler-libs-4.05.0-6.el7.x86_64
--> Running transaction check
---> Package libX11-common.noarch 0:1.6.5-2.el7 will be installed
---> Package libxcb.x86_64 0:1.13-1.el7 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.13-1.el7.x86_64
---> Package ocaml.x86_64 0:4.05.0-6.el7 will be installed
--> Processing Dependency: ocaml-srpm-macros for package: ocaml-4.05.0-6.el7.x86_64
--> Running transaction check
---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
---> Package ocaml-srpm-macros.noarch 0:5-2.el7 will be installed
--> Finished Dependency Resolution

When I look into the ocaml deps (ie. yum whatprovides 'ocaml(Buffer)') I see this:

ocaml-runtime-4.05.0-6.el7.x86_64 : OCaml runtime environment
Repo        : base
Matched from:
Provides    : ocaml(Buffer) = 29acb19a28b900e41ca251c3107ecf7f

Installing it with yum install ocaml-runtime then tries to pull in all of ocaml:

Dependencies Resolved

================================================================================================================================================================================================================================================================================
 Package                                                                   Arch                                                         Version                                                                Repository                                                  Size
================================================================================================================================================================================================================================================================================
Installing:
 ocaml-runtime                                                             x86_64                                                       4.05.0-6.el7                                                           base                                                       2.8 M
Installing for dependencies:
 libX11                                                                    x86_64                                                       1.6.5-2.el7                                                            base                                                       606 k
 libX11-common                                                             noarch                                                       1.6.5-2.el7                                                            base                                                       164 k
 libXau                                                                    x86_64                                                       1.0.8-2.1.el7                                                          base                                                        29 k
 libxcb                                                                    x86_64                                                       1.13-1.el7                                                             base                                                       214 k
 ocaml                                                                     x86_64                                                       4.05.0-6.el7                                                           base                                                        26 M
 ocaml-compiler-libs                                                       x86_64                                                       4.05.0-6.el7                                                           base                                                       7.6 M
 ocaml-srpm-macros                                                         noarch                                                       5-2.el7                                                                base                                                       4.7 k

Transaction Summary
================================================================================================================================================================================================================================================================================
Install  1 Package (+7 Dependent packages)

I've been trying to get rid of these deps but haven't figured out how... Maybe you have a hint as I'm still not sure what parts of my build are pulling in all the ocaml(*) deps ;)

edit: This is a local build that only contains the following files:

/usr/lib64/ocaml/fdkaac
/usr/lib64/ocaml/fdkaac/META
/usr/lib64/ocaml/fdkaac/fdkaac.cma
/usr/lib64/ocaml/fdkaac/fdkaac.cmi
/usr/lib64/ocaml/fdkaac/fdkaac_loader.cma
/usr/lib64/ocaml/fdkaac/fdkaac_loader.cmi
/usr/lib64/ocaml/stublibs/dllfdkaac_stubs.so
/usr/lib64/ocaml/stublibs/dllfdkaac_stubs.so.owner
/usr/share/doc/ocaml-fdkaac-0.2.1
/usr/share/doc/ocaml-fdkaac-0.2.1/README
/usr/share/licenses/ocaml-fdkaac-0.2.1
/usr/share/licenses/ocaml-fdkaac-0.2.1/COPYING

According to the Fedora OCaml Packaging Guide all of these files should be in the main package... I'm pretty sure I'm missing something.