Hi, I am trying to compile super-freeswan with gcc3.3.1 (~x86). I get many of the following type errors: gcc -O3 -omit-frame-pointer -I../include -c -o hmac_sha2.o hmac_sha2.c cc1: error: unrecognized option `-strip' I found out that if we change "-omit-frame-pointer" to "-fomit-frame-pointer" the problem goes away. Reproducible: Always Steps to Reproduce: 1.use CSH, gcc-3.3.1 (~x86) 2. emerge super-freswan |& tee LOG 3. Search log for "error"
I did a scan of the super-freeswan ebuilds, and found no mention of -fomit-frame-pointer in them. Can you check the CFLAGS you have set in /etc/make.conf and see if you may have accidentially mispelled -fomit-frame-pointer in there? You also mention using "csh" as a shell (I think) and then emerging. Is this a possible sideeffect?
CSH shell was not a problem as I was getting the same error in bash also. I will scan my make.conf when I reach home today but I think, it is correct. I downloaded the freeswan package from the site specified in the ebuild, unpacked it and found the many of the Makefiles have -omit-frame-pointer not -fomit-frame-pointer as CFLAG. I don't know how to write a patch and I don't want to install the freeswan directly without ebuild :( Here is one makefile: -------------------------------------------------------------- .../super-freeswan-1.99.7.3/libcrypto/libsha2 CFLAGS=-O3 -omit-frame-pointer -I../include $(EXTRA_CFLAGS) LIBOBJ := hmac_sha2.o sha2.o BLIB := libsha2.a .S.o: $(CC) $(AFLAGS) -c $< -o $@ $(BLIB): $(LIBOBJ) /bin/rm -f $(BLIB) ar cr $(BLIB) $(LIBOBJ) -if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \ else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \ else exit 0; fi; fi test: test_main.o $(BLIB) $(CC) -o $@ $^ clean: rm -f *.[oa] core $(TARGET) test ------------------------------------------------------------------------ Prabhat
problem is -omit-frame-pointer in those Makefiles. should be -fomit-frame-pointer I don't know, why -omit-frame-pointer is accepted by gcc anyway, I'd call this a bug. so, actually two bugs here: a) gcc should barf on -omit-frame-pointer b) super-freeswan Makefiles should use -fomit-frame-pointer $ gcc --help -v 2>&1 | grep omit-frame-pointer -fomit-frame-pointer When possible do not generate stack frames $
Created attachment 18608 [details, diff] Patch to replace -omit-frame-pointer with -fomit-frame-pointer Give this patch a try and see if it allows super-freeswan to compile for you. If it does, I'll add it to the ebuild.
I forgot to mention that the super-freeswan depends on libpcap. libpcap is not fetched automatically by ebuild. http://sourceforge.net/projects/libpcap/ I will try the patch in the evening. So, to apply the patch, I have to download the package from www.freeswan.ca, unpack it and then go to cd super-freeswan-1.99.7.3 patch -p1 < <your patch> is this correct?
Created attachment 18617 [details, diff] Diff to super-freeswan-1.99.7.3 ebuild to add previous patch Here's a better (and quicker) idea. First, Take this patch I have provided, it will modify the super-freeswan-1.99.7.3 ebuild to add in the appropriate lines to apply the other patch I provided. Simply save it, and move this patch to the /usr/portage/net-misc/super-freeswan folder. Apply the patch from there, and it will modify the ebuild. You can then delete this patch, as it's no longer needed. Next, save the original patch I posted, and move it to /usr/portage/net-misc/super-freeswan/files. Give the patch this name: "super-freeswan-1.99.7.3-bad-cflags-fix.patch". Next, change to the super-freeswan directory and run "ebuild super-freeswan-1.99.7.3.ebuild digest compile". This will regenerate the digest files and then unpack and compile the package. During the source unpacking phase, you will see the above patch applied. If the above patch fails for any reason, let me know. Otherwise, it will have modified approximately four Makefiles (the only four I found with -omit-frame-pointer). If it unpacks successfully, it will then move onto the compiling phase, and if that completes successfully, then the patch is successful. If this becomes the case, post here that the patch succeeded, and I'll put the patch into Portage so that it fixes this bug permanently.
I am trying to apply the patch on the ebuild with following command: patch < bug29783-ebuild.patch This is giving error. What is the correct command for applying patch? I am sorry for too simple questions.
I am able to apply your first patch and it works perfect but I can't apply the patch to the ebuild. I guess, you will check-in the modified ebuild. Thanks Prabhat
Resolving as FIXED; Patch is in CVS.
Oops, wrong status change...