Closed Bug 1043019 Opened 10 years ago Closed 10 years ago

Port |Bug 1036894 - Move in-tree library linkage information to moz.build| and |Bug 1041936 - Allow static library definitions to depend on shared libraries| to comm-central

Categories

(MailNews Core :: Build Config, defect)

defect
Not set
normal

Tracking

(thunderbird34 fixed)

RESOLVED FIXED
Thunderbird 34.0
Tracking Status
thunderbird34 --- fixed

People

(Reporter: iannbugzilla, Assigned: iannbugzilla)

References

Details

Attachments

(1 file, 4 obsolete files)

This is for porting the relevant parts of:
Bug 1036894 - Move in-tree library linkage information to moz.build
Bug 1041936 - Allow static library definitions to depend on shared libraries
Other bugs need to be ported as part of this (e.g. Bug 1038639, Bug 1040639 and Bug 1040641).
Assignee: nobody → iann_bugzilla
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86_64 → All
(In reply to Ian Neal from comment #0)
> Created attachment 8461176 [details] [diff] [review]
> Port part 1 of Bug 1036894 and Bug 1041936 (WIP)
> 
> This is for porting the relevant parts of:
> Bug 1036894 - Move in-tree library linkage information to moz.build
> Bug 1041936 - Allow static library definitions to depend on shared libraries
> Other bugs need to be ported as part of this (e.g. Bug 1038639, Bug 1040639
> and Bug 1040641).

With this patch still fails, with errors similar to:
../../../../../mozilla/build/unix/gold/ld: error: /home/gizmo/central/c-c/obj-sm/calendar/base/backend/libical/build/../calDateTime.o: requires dynamic R_X86_64_PC32 reloc against '_ZTV16GenericClassInfo' which may overflow at runtime; recompile with -fPIC
and then:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[9]: *** [libcalbasecomps.so] Error 1
make[9]: Leaving directory `/home/gizmo/central/c-c/obj-sm/calendar/base/backend/libical/build'
Adds:
part 8 - Move most in-tree library linkage information to moz.build, as USE_LIBS
Attachment #8461176 - Attachment is obsolete: true
There were a few changes from config.mk and rules.mk missing, still fails building libxul.so though,
Attachment #8461246 - Attachment is obsolete: true
Includes part 9 now, but removed im/ part as that is now in bug 1043045
Attachment #8461252 - Attachment is obsolete: true
Depends on: 1043045
Adds changes from part 6 along with relevant USE_LIBS changes for tests.
Attachment #8461553 - Attachment is obsolete: true
Comment on attachment 8461687 [details] [diff] [review]
Port parts 1, 6, 8 and 9 of Bug 1036894 and Bug 1041936 (WIP)

When I try to build on TB I get the following error:
make[5]: Entering directory `/home/gizmo/central/c-c/obj-tb/mozilla/build/unix/elfhack'
/usr/bin/ccache c++  -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -fno-strict-aliasing -fno-rtti -fno-math-errno -std=gnu++0x -pthread -pipe -fexceptions  -DNDEBUG -DTRIMMED -g -Os -freorder-blocks  -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,-h, -o test-array.so -lpthread  -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B /home/gizmo/central/c-c/obj-tb/mozilla/build/unix/gold    -Wl,-rpath-link,/home/gizmo/central/c-c/obj-tb/mozilla/dist/bin -Wl,-rpath-link,/usr/local/lib  test-array.o -nostartfiles
/usr/bin/ccache c++  -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -fno-strict-aliasing -fno-rtti -fno-math-errno -std=gnu++0x -pthread -pipe -fexceptions  -DNDEBUG -DTRIMMED -g -Os -freorder-blocks  -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,-h, -o test-ctors.so -lpthread  -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B /home/gizmo/central/c-c/obj-tb/mozilla/build/unix/gold    -Wl,-rpath-link,/home/gizmo/central/c-c/obj-tb/mozilla/dist/bin -Wl,-rpath-link,/usr/local/lib  test-ctors.o -nostartfiles
//home/home/gizmo/centralgizmo/c/central-c/c/obj-c-tb/obj/mozilla-tb/build/mozilla/unix/build/gold/unix/ld/gold: /ldfatal : error:fatal  -error:h: - musth: take must a take non a-empty non argument-empty
 argument
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[5]: *** [test-array.so] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [test-ctors.so] Error 1
make[5]: Leaving directory `/home/gizmo/central/c-c/obj-tb/mozilla/build/unix/elfhack'
make[4]: *** [build/unix/elfhack/libs] Error 2

I have tried to port:
Bug 933120 - Move HOST_PROGRAM and HOST_SIMPLE_PROGRAMS to moz.build
but when I include PROGRAM \ in the config.mk the build system complains:
config/config.mk:94: *** Variable PROGRAM is defined in objdir/Makefile. It should only be defined in moz.build files.  Stop.
Flags: needinfo?(Pidgeot18)
Apparently that error is bug 1043084
Depends on: 1043084
Flags: needinfo?(Pidgeot18)
Comment on attachment 8461687 [details] [diff] [review]
Port parts 1, 6, 8 and 9 of Bug 1036894 and Bug 1041936 (WIP)

You will also need to have applied patch from bug 1043040 and either use clang or apply patch from bug 1043084 to build and test.
Attachment #8461687 - Flags: review?(Pidgeot18)
Comment on attachment 8461687 [details] [diff] [review]
Port parts 1, 6, 8 and 9 of Bug 1036894 and Bug 1041936 (WIP)

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

I didn't look over this in detail, but it gets the builds working, and I'm assuming that all the *.mk changes are mindless copy-paste from appropriate m-c changes.

I'm pretty sure the USE_LIBS += ['mozalloc'] changes aren't needed outside of the MOZ_INCOMPLETE_EXTERNAL_LINKAGE blocks, but I don't have the time to poke to make sure; considering I'm seriously considering ripping out incomplete external linkage anyways, this can be revisited later.

OS X, as predicted, doesn't build with this patch, but that's a separate issue that shouldn't block this patch.
Attachment #8461687 - Flags: review?(Pidgeot18) → review+
https://hg.mozilla.org/comm-central/rev/5b95a462eb16
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 34.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: