Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#16916 closed defect (fixed)

texlive_base failed to build

Reported by: trog24 (Frank J. R. Hanstick) Owned by: milosh@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: texlive Cc: michaelld (Michael Dickens), garribald@…, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: texlive_base

Description (last modified by ryandesign (Ryan Carsten Schmidt))

During the first attempt to install octive-vrml, I experienced the following error:

gcc -ObjC++ -I../../libs/icu-xetex/common -I./../../libs/icu-xetex/ 
common -I./../../libs/icu-xetex/layout -DLE_USE_CMEMORY -I/opt/local/include -I/opt/local/include/freetype2 -DHAVE_CONFIG_H  -I. -I. -I.. -I./.. -isystem/opt/local/include -I../../libs/obsdcompat -I../../libs/obsdcompat/.. -I./../../libs/obsdcompat -I./..
../libs/ obsdcompat/.. -DXETEX_MAC -c xetexdir/XeTeXFontMgr_Mac.mm -o  XeTeXFontMgr_Mac.o
cc1objplus: error: invalid option argument '-ObjC++'
make[2]: *** [XeTeXFontMgr_Mac.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1

Error: The following dependencies failed to build: octave texlive  
texlive_base
Error: Status 1 encountered during processing.

It was pointed out to me that the error should not have occurred if gcc-4.0.1 was used; but, gcc-4.0.1 was not used when compiling xetexdir/XeTeXFontMgr_Mac.mm. Earlier, I had installed gcc-mp-4.3.2 via MacPorts and gcc-mp-4.3.2 does not recognize -ObjC++. The curious part was that only xetexdir/XeTeXFontMgr_Mac.mm tried to compile with gcc-mp-4.3.2. All other files used gcc-4.0.1. Further research explained why the xetexdir/XeTeXFontMgr_Mac.mm did not reference gcc-4.0.1. Instead of a prefixed call to /usr/bin/gcc, the call for xetexdir/XeTeXFontMgr_Mac.mm was gcc with no prefix. In order to use MacPorts installed programs, the path has /opt/local/bin as the first option in the path name. Since /opt/local/bin is the first option, an unprefixed gcc call will find the gcc-mp-4.3.2 first and use it instead of gcc-4.0.1. This simple structure caused this problem with the unprefixed gcc call. To verify that the call was an (no change because of installing gcc-mp-4.3.2) unprefixed gcc in every case, I uninstalled gcc-mp-4.3.2, did a build with the -d option while outputting to a log file, and checking the log file for the xetexdir/XeTeXFontMgr_Mac.mm compile command to find that I was correct in an unprefixed call to gcc. Not having gcc-mp-4.3.2 installed resulted in a good build which was expected. Reinstalling gcc-mp-4.3.2 resulted in a bad build which I also expected. I then suspected that the Makefile used for compilation contained the unprefixed call and to verify that suspicion unpacked texlive_base in my Desktop directory, searched the various directories to find the directory for compiling xetexdir/XeTeXFontMgr_Mac.mm, and found that Makefile had not yet been created. I then ran ./configure and the result was a Makefile with an unprefixed call to gcc for xetexdir/XeTeXFontMgr_Mac.mm and prefixed calls to gcc for all other modules. I did not trace the problem source back any further than the Makefile generation verification because I did not know enough of the procedure needed to build texlive to make changes farther back. As far as I know, this is a problem for the texlive_base author to fix; but, decided to go through MacPorts since MacPorts is porting texlive_base and the maintainer of the texlive port should be aware of this problem and already have contacts with the authors of texlive. I am not going to attach the log file because it is quite large; but, will make it available upon request if needed. The log file will probably not tell you any more than I already have, namely that xetexdir/XeTeXFontMgr_Mac.mm is the only module with an unprefixed gcc call. While I do not think the platform is relevant, I will provide the basics, namely: 2001 PowerPC G4 Quicksilver upgraded to dual 1.73 GHz MPC-7448 from a dual 800 MHZ MPC-7450 with 1.5 GB RAM running under Mac OS 10.4.11.

Attachments (1)

patch_for_files_patch-texk_web2c_xetexdir_xetex_mk.diff (942 bytes) - added by michaelld (Michael Dickens) 15 years ago.
patch for 'files/patch-texk_web2c_xetexdir_xetex_mk' to correct GCC compile issue

Download all attachments as: .zip

Change History (13)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Description: modified (diff)
Keywords: texlive added; texlive_base removed
Owner: changed from macports-tickets@… to milosh@…
Port: texlive_base added; texlive removed

Assigning to maintainer.

comment:2 Changed 15 years ago by milosh@…

Status: newassigned

comment:3 Changed 15 years ago by michaelld (Michael Dickens)

The OP is correct, assuming /opt/local/bin is in the PATH before /usr/bin and hence any 'gcc' installed by MacPorts will be found first. This port requires Apple's GCC to work properly, so using '$(CC)' in place of 'gcc' will work since that's defined by 'configure' correctly. I'm attaching a 'diff -u' on the patch file 'files/patch-texk_web2c_xetexdir_xetex_mk' which fixes this issue.

Changed 15 years ago by michaelld (Michael Dickens)

patch for 'files/patch-texk_web2c_xetexdir_xetex_mk' to correct GCC compile issue

comment:4 Changed 15 years ago by michaelld (Michael Dickens)

Cc: mlk@… added

Cc Me!

comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

Replacing "-mt-" with "-mp-" in description.

comment:6 Changed 15 years ago by garribald@…

Cc: garribald@… added

Cc Me!

comment:7 Changed 15 years ago by garribald@…

I ran into the same error - in my case it's an installed gcc42 via MacPorts (OS X 10.4.11). My workaround was to deactivate the gcc42 port for the time being and then continue the building/installation of texlive_base (successfully btw, I just wanted to get over with it because the whole stuff is now needed for ffmpeg and i am somewhat curious about dirac). Will try the added patch, if a confirmation is still needed.

comment:8 Changed 15 years ago by alakazam@…

I have also encountered this problem. The attached patch fixes it. Could it be committed ?

comment:9 Changed 15 years ago by alakazam@…

Cc: mcalhoun@… added

Does r46402 fix this problem ? I see that it adds

+post-configure {
+    # Ensure correct compiler is used
+    reinplace "s|gcc -ObjC++ |\$(CC) -ObjC++ |" \
+        ${worksrcpath}/texk/web2c/Makefile
+}

which I think is the solution to this problem ?

comment:10 Changed 15 years ago by michaelld (Michael Dickens)

Yes, r46402 fixes the problem for me. Thanks! - MLD

comment:11 Changed 15 years ago by alakazam@…

Resolution: fixed
Status: assignedclosed

comment:12 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.