toolkit/library has an inter-dependency on ldap for comm-central that it needs to be told about in the moz.build world.

RESOLVED FIXED in mozilla34

Status

defect
RESOLVED FIXED
5 years ago
a year ago

People

(Reporter: iann_bugzilla, Assigned: iann_bugzilla)

Tracking

Trunk
mozilla34

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
In the moz.build world if you try and build out of comm-central you get an error similar to:
    INPUT("StaticXULComponentsEnd/StaticXULComponentsEnd.o")

../../build/unix/gold/ld: error: cannot find -lldap60
../../build/unix/gold/ld: error: cannot find -lprldap60
../../build/unix/gold/ld: error: cannot find -lldif60
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [libxul.so] Error 1
make[5]: Leaving directory `/home/gizmo/central/c-c/obj-sm/mozilla/toolkit/library'
make[4]: *** [toolkit/library/target] Error 2

If you set:
TOPLEVEL_BUILD=1; export TOPLEVEL_BUILD
and run either:
make -C obj-sm/ldap/sdks/c-sdk/ libs
or:
make -C obj-sm/ldap/ libs
or:
make -C obj-sm/ldap/sdks/c-sdk/ export

then the relevant libraries get built

If you try and add the following to m-c's Makefile.in:
ifdef MOZ_LDAP_XPCOM
toolkit/library/export: ../ldap/sdks/c-sdk/ldap/export
endif

You get the message:
make recurse_export
make[4]: Entering directory `/home/gizmo/central/c-c/obj-sm/mozilla'
make[4]: *** No rule to make target `../ldap/sdks/c-sdk/export', needed by `toolkit/library/export'.  Stop.

I'm probably getting some obvious wrong.
I mentioned this on IRC, but:

Try using ldap/ instead of ldap/sdks/c-sdk/ldap. The former was added to bridge the fact that the SDK's build system is screwy.
(Assignee)

Comment 2

5 years ago
Using in m-c's Makefile.in:
toolkit/library/target: ../ldap/target
gives:
make[4]: *** No rule to make target `../ldap/target', needed by `toolkit/library/target'.  Stop.

If I try update the ldap/Makefile.in to add target to export I get:
make[5]: Entering directory `/home/gizmo/central/c-c/obj-sm/ldap'
Makefile:17: *** recipe commences before first target.  Stop.
make[5]: Leaving directory `/home/gizmo/central/c-c/obj-sm/ldap'
make[4]: *** [../ldap/export] Error 2

Adding to the libs line gives:
make[4]: *** No rule to make target `../ldap/target', needed by `toolkit/library/target'.  Stop.
(Assignee)

Comment 3

5 years ago
There is also a patch for ldap's moz.build and Makefile.in to complete the fix.
Assignee: nobody → iann_bugzilla
Status: NEW → ASSIGNED
Attachment #8465141 - Flags: review?(mh+mozilla)
(Assignee)

Comment 4

5 years ago
I did try having target doing the same as export but the build system did not like the way recipe commenced.
Attachment #8465144 - Flags: review?(Pidgeot18)
(Assignee)

Updated

5 years ago
Blocks: 1044460
Comment on attachment 8465144 [details] [diff] [review]
Changes to ldap's moz.build and Makefile.in [Checked in: Comment 7]

Review of attachment 8465144 [details] [diff] [review]:
-----------------------------------------------------------------

::: ldap/moz.build
@@ +2,5 @@
>  # This Source Code Form is subject to the terms of the Mozilla Public
>  # License, v. 2.0. If a copy of the MPL was not distributed with this
>  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
>  
> +LIBRARY_NAME = 'ldapsdks'

Please add a note about why this is needed.
Attachment #8465144 - Flags: review?(Pidgeot18) → review+
Comment on attachment 8465144 [details] [diff] [review]
Changes to ldap's moz.build and Makefile.in [Checked in: Comment 7]

Review of attachment 8465144 [details] [diff] [review]:
-----------------------------------------------------------------

::: ldap/Makefile.in
@@ +13,5 @@
>  libs clean distclean::
>  	$(MAKE) -C $(DEPTH)/ldap/sdks/c-sdk $@
>  
> +target::
> +	$(MAKE) -C $(DEPTH)/ldap/sdks/c-sdk export

export, not libs?
Attachment #8465141 - Flags: review?(mh+mozilla) → review+
(Assignee)

Comment 7

5 years ago
Comment on attachment 8465144 [details] [diff] [review]
Changes to ldap's moz.build and Makefile.in [Checked in: Comment 7]

https://hg.mozilla.org/comm-central/rev/400d3f9380fb
Attachment #8465144 - Attachment description: Changes to ldap's moz.build and Makefile.in → Changes to ldap's moz.build and Makefile.in [Checked in: Comment 7]
(Assignee)

Comment 8

5 years ago
Comment on attachment 8465141 [details] [diff] [review]
m-c's Makefile.in change to add ldap dependency for toolkit/library [Checked in m-i: Comment 8]

https://hg.mozilla.org/integration/mozilla-inbound/rev/47bba71f4c66
Attachment #8465141 - Attachment description: m-c's Makefile.in change to add ldap dependency for toolkit/library → m-c's Makefile.in change to add ldap dependency for toolkit/library [Checked in m-i: Comment 8]
Attachment #8465141 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/47bba71f4c66
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
QA Whiteboard: [qa-]

Updated

a year ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.