bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #3343] fails to compile: undefined reference to memcpy


From: nobody
Subject: [bug #3343] fails to compile: undefined reference to memcpy
Date: Sun, 16 Nov 2003 09:37:12 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030428

=================== BUG #3343: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=3343&group_id=68

Changes by: Yoshinori K. Okuji <address@hidden>
Date: Sun 11/16/03 at 14:37 (GMT)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Wont Fix
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
Do not specify -O3 or other options to gcc.



=================== BUG #3343: FULL BUG SNAPSHOT ===================


Submitted by: generica                Project: GNU GRUB                     
Submitted on: Sun 04/27/03 at 11:21
Category:  Compilation                Severity:  Major                      
Priority:  None                       Bug Group:  Non-software Error        
Resolution:  Wont Fix                 Assigned to:  None                    
Originator Name:                      Originator Email:                     
Status:  Closed                       Release:  0.93                        
Reproducibility:  Every Time          Planned Release:                      

Summary:  fails to compile: undefined reference to memcpy

Original Submission:  

linuxfromscratch system



gcc version 3.2.2

glibc version 2.3.1



Making all in stage2

make[2]: Entering directory `/usr/src/toinstall/grub-0.93/stage2'

gcc  -O3 -march=i586   -o pre_stage2.exec -nostdlib -Wl,-N -Wl,-Ttext -Wl,8200 
pre_stage2_exec-asm.o pre_stage2_exec-bios.o pre_stage2_exec-boot.o 
pre_stage2_exec-builtins.o pre_stage2_exec-char_io.o pre_stage2_exec-cmdline.o 
pre_stage2_exec-common.o pre_stage2_exec-console.o pre_stage2_exec-disk_io.o 
pre_stage2_exec-fsys_ext2fs.o pre_stage2_exec-fsys_fat.o 
pre_stage2_exec-fsys_ffs.o pre_stage2_exec-fsys_jfs.o 
pre_stage2_exec-fsys_minix.o pre_stage2_exec-fsys_reiserfs.o 
pre_stage2_exec-fsys_vstafs.o pre_stage2_exec-fsys_xfs.o 
pre_stage2_exec-gunzip.o pre_stage2_exec-hercules.o pre_stage2_exec-md5.o 
pre_stage2_exec-serial.o pre_stage2_exec-smp-imps.o pre_stage2_exec-stage2.o 
pre_stage2_exec-terminfo.o pre_stage2_exec-tparm.o

pre_stage2_exec-terminfo.o: In function `ti_set_term':

pre_stage2_exec-terminfo.o(.text+0x220): undefined reference to `memcpy'

pre_stage2_exec-terminfo.o: In function `ti_get_term':

pre_stage2_exec-terminfo.o(.text+0x23d): undefined reference to `memcpy'

collect2: ld returned 1 exit status

make[2]: *** [pre_stage2.exec] Error 1

make[2]: Leaving directory `/usr/src/toinstall/grub-0.93/stage2'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/usr/src/toinstall/grub-0.93'

make: *** [all] Error 2



Follow-up Comments
*******************

-------------------------------------------------------
Date: Sun 11/16/03 at 14:37         By: okuji
Do not specify -O3 or other options to gcc.

-------------------------------------------------------
Date: Tue 07/22/03 at 18:01         By: joachim_kainz
Actually, my last comment does not work that great, but the attached files 
should solve the problem.

-------------------------------------------------------
Date: Tue 07/22/03 at 16:42         By: joachim_kainz
In the three lines mentioned memcpy is not used directly, but there are 
pass-by-value semantics used. As a consequence it seems that newer versions of 
gcc try to use memcpy (from stdlib) to create the duplicate structures.



I fixed the problem in my environment by adding the following code to the end 
of stage2/char_io.c:



#undef memcpy



void *

memcpy (void *to, const void *from, int len)

{

    return grub_memmove (to, from, len);

}



There are most likely more elegant ways to resolve this issue.


CC list is empty


File Attachments
****************

-------------------------------------------------------
Date: Tue 07/22/03 at 18:01  Name: fixes.tar.gz  Size: 31KB   By: joachim_kainz

http://savannah.gnu.org/bugs/download.php?group_id=68&amp;bug_id=3343&amp;bug_file_id=545


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=3343&group_id=68

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]