On Tue, Jan 27, 2009 at 11:41 AM, Benny Prijono <bennylp at teluu.com> wrote: > On Thu, Jan 22, 2009 at 10:08 AM, Alexei Kuznetsov <eofster at gmail.com> > wrote: >> >> Hi, >> >> One of the mailing list subscribers sent me a message with proper >> ./configure parameters for cross-compiling for PowerPC Macs being on >> Intel Mac: >> >> ./configure --host=powerpc-apple-darwin9 --build=powerpc >> >> By I still have to manually modify rules.mak (in the quote) when I >> switch the build system back and forth. >> > > Did you mean patching the RANLIB thing? Actually what is the value of > $(RANLIB) there? Normally "ranlib" shouldn't need other parameters than the > archive filename. In order to build for ppc, I had to change one line in build/rules.mak from this $(RANLIB) $(LIB) to this $(RANLIB) -o $(LIB) $(OBJS) Without that after "make" I was getting this ranlib: file: ../lib/libpj-powerpc-apple-darwin9.a(pool_dbg.o) has no symbols powerpc-apple-darwin9-ranlib ../lib/libpj-powerpc-apple-darwin9.a powerpc-apple-darwin9-ranlib: no output file specified (specify with -o output) Usage: powerpc-apple-darwin9-ranlib -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] Usage: powerpc-apple-darwin9-ranlib -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load] make[2]: *** [../lib/libpj-powerpc-apple-darwin9.a] Error 1 make[1]: *** [pjlib] Error 2 make: *** [all] Error 1 Is that what you're asking? >> >> Can you suggest something to automate this? Of course I could just >> apply patches in some script, but is there a right way by adding some >> .mak file or something else just for cross-compilation for ppc? >> > > Apart from the suspicious ranlib, I think this should have been supported by > existing script. > > cheers > Benny Regards, Alexei >> On Tue, Jan 20, 2009 at 9:17 PM, Alexei Kuznetsov <eofster at gmail.com> >> wrote: >> > Hi, >> > >> > I'm on Intel Mac and trying to build pjproject-1.0.1 for both i386 and >> > ppc platforms. >> > >> > Building for i386 is okay with ./configure && make dep && make. >> > >> > When I'm trying to configure for ppc, I'm getting this: >> > $ ./configure --host=powerpc-apple-darwin9 CFLAGS="-arch ppc" >> > aconfigure: WARNING: you should use --build, --host, --target >> > checking build system type... powerpc-unknown-none >> > checking host system type... powerpc-apple-darwin9 >> > checking target system type... powerpc-unknown-none >> > checking for powerpc-apple-darwin9-gcc... powerpc-apple-darwin9-gcc >> > checking for C compiler default output file name... aconfigure: error: >> > C compiler cannot create executables >> > See `config.log' for more details. >> > >> > If I change configure to acounfigure with the same parameters, >> > configuration runs to the end >> > $ ./configure --host=powerpc-apple-darwin9 CFLAGS="-arch ppc" >> > >> > Then I run "make dep", and then "make" which stops with that: >> > ranlib: file: ../lib/libpj-powerpc-apple-darwin9.a(pool_dbg.o) has no >> > symbols >> > powerpc-apple-darwin9-ranlib ../lib/libpj-powerpc-apple-darwin9.a >> > make[2]: powerpc-apple-darwin9-ranlib: Command not found >> > make[2]: *** [../lib/libpj-powerpc-apple-darwin9.a] Error 127 >> > make[1]: *** [pjlib] Error 2 >> > make: *** [all] Error 1 >> > >> > Then I'm editing build/rules.mak file as follows (changing one line): >> > $ svn diff >> > Index: build/rules.mak >> > =================================================================== >> > --- build/rules.mak (revision 2412) >> > +++ build/rules.mak (working copy) >> > @@ -77,7 +77,7 @@ >> > $(LIB): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) >> > if test ! -d $(LIBDIR); then $(subst @@,$(subst >> > /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR)); fi >> > $(AR) $(LIB) $(OBJS) >> > - $(RANLIB) $(LIB) >> > + $(RANLIB) -o $(LIB) $(OBJS) >> > >> > $(EXE): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) >> > if test ! -d $(BINDIR); then $(subst @@,$(subst >> > /,$(HOST_PSEP),$(BINDIR)),$(HOST_MKDIR)); fi >> > >> > >> > And "make" runs till the end. >> > >> > Am I doing something wrong? Or what can I do not to edit rules.mak >> > file evey time I'm switching the build system from i386 to ppc and >> > vice versa? >> > >> > Best regards, >> > Alexei