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: Tue, 22 Jul 2003 14:01:13 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030529

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

Changes by: Joachim F. Kainz <address@hidden>
Date: Tue 07/22/2003 at 18:01 (GMT)

------------------ Additional Follow-up Comments ----------------------------
Actually, my last comment does not work that great, but the attached files 
should solve the problem.

------------------ Additional Bug Attachment  ----------------------------
File name: fixes.tar.gz                   Size:31 KB

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



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


Submitted by: generica                Project: GNU GRUB                     
Submitted on: Sun 04/27/2003 at 11:21
Category:  Compilation                Severity:  Major                      
Priority:  None                       Bug Group:  Non-software Error        
Resolution:  None                     Assigned to:  None                    
Status:  Open                         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: Tue 07/22/2003 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/2003 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/2003 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]