Skip to content

include string.h before poison pragma to avoid build issues on CentOS 7 - #123

Merged
magomez merged 1 commit into
WebPlatformForEmbedded:masterfrom
jfgrimm:include-string-before-poison
Jan 27, 2023
Merged

magomez merged 1 commit into
WebPlatformForEmbedded:masterfrom
jfgrimm:include-string-before-poison

Conversation

@jfgrimm

@jfgrimm jfgrimm commented Dec 22, 2022

Copy link
Copy Markdown
Contributor

include string.h before poisoning {c,m}alloc to avoid compilation issues on a CentOS 7 system:

225 /opt/apps/easybuild/software/GCCcore/11.3.0/bin/gcc -DWPE_COMPILATION -DWPE_ENABLE_XKB=1 -Dwpe_EXPORTS -I/tmp/jfg508/libwpe/1.13.3/GCCcore-11.3.0/libwpe-1.13.3/include -I/tmp/jfg508/libwpe/1.13.3/GCCcore-11.3.0/libwpe-1.13.3/src -O2 -ftree-vectorize -march=native -fno-math-errno -fPIC -Wall -O3 -DNDEBUG -fPIC -fvisibility=hidden -std=gnu99 -MD -MT CMakeFiles/wpe.dir/src/pasteboard.c.o -MF CMakeFiles/wpe.dir/src/pasteboard.c.o.d -o CMakeFiles/wpe.dir/src/pasteboard.c.o -c /tmp/jfg508/libwpe/1.13.3/GCCcore-11.3.0/libwpe-1.13.3/src/pasteboard.c
226 In file included from /usr/include/string.h:633,                                                                        
227                  from /tmp/jfg508/libwpe/1.13.3/GCCcore-11.3.0/libwpe-1.13.3/src/pasteboard.c:32:                       
228 /usr/include/bits/string2.h:1305:33: error: attempt to use poisoned "calloc"                                            
229  1305 |                      ? (char *) calloc ((size_t) 1, (size_t) 1)               \                                 
230       |                                 ^                                                                               
231 /usr/include/bits/string2.h:1307:53: error: attempt to use poisoned "malloc"                                            
232  1307 |                           char *__retval = (char *) malloc (__len);           \                                 
233       |                                                     ^                                                           
234 /usr/include/bits/string2.h:1325:33: error: attempt to use poisoned "calloc"                                            
235  1325 |                      ? (char *) calloc ((size_t) 1, (size_t) 1)               \                                 
236       |                                 ^                                                                               
237 /usr/include/bits/string2.h:1331:47: error: attempt to use poisoned "malloc"                                            
238  1331 |                           __retval = (char *) malloc (__len);                 \                                 
239       |                                               ^                                                                 
240 make[2]: *** [CMakeFiles/wpe.dir/src/pasteboard.c.o] Error 1  

@jfgrimm

jfgrimm commented Jan 18, 2023

Copy link
Copy Markdown
Contributor Author

I'm not sure I understand why the CI code style check failed

@magomez

magomez commented Jan 27, 2023

Copy link
Copy Markdown
Contributor

I'm not sure I understand why the CI code style check failed

Probably because the coding style says that the includes need to be in alphabetical order.

@magomez

magomez commented Jan 27, 2023

Copy link
Copy Markdown
Contributor

Please, don't use two commits for this. Could you force push a single commit with the change, please?

@jfgrimm
jfgrimm force-pushed the include-string-before-poison branch from cae2f0b to 81a5038 Compare January 27, 2023 12:19
@jfgrimm

jfgrimm commented Jan 27, 2023

Copy link
Copy Markdown
Contributor Author

Please, don't use two commits for this. Could you force push a single commit with the change, please?

sorry, done

@magomez
magomez merged commit 5902d8e into WebPlatformForEmbedded:master Jan 27, 2023
@jfgrimm
jfgrimm deleted the include-string-before-poison branch January 27, 2023 12:43
aperezdc pushed a commit that referenced this pull request Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants