[Bug 1992159] Re: Syntax error defien in socket.h
Dominik Viererbe
1992159 at bugs.launchpad.net
Tue Feb 28 13:38:33 UTC 2023
Hello Karsten,
I could replicate your problem and I am in the process of submitting the Stable Release Update (SRU). This is my first SRU and I am still unsure about the process. So it could take a while for it to be accepted or it could be rejected.
Thanks again for submitting the bug and responding to my question :)
** Description changed:
+ [ Impact ]
+
+ * What are the effects of the bug on users?
+ Some Compilers will exit with a syntax error when
+ a user tries to compile glibc for systems where the
+ 'time_t' type of the default ABI is 32 bits (e.g. arm,
+ hppa, microblaze). The compiler must be a Clang compiler
+ with a major version of less than four and is either a
+ GNUC compiler with a major version of less than two or no
+ GNUC compiler.
+
+ If someone should be confused; here is the logical notation
+ (See "Other Info" before you evaluate this!):
+ TIME_BITS_SIZE = 32 AND CLANG_MAJOR < 4
+ AND (NOT GNUC OR GNUC < 2)
+
+ Additionally, a few C pre-processors (an overwhelming
+ minority) will throw a syntax error if they encounter an
+ unknown pre-processor keyword, even if it is unreachable
+ (like this bug).
+
+ * What is the justification for backporting the fix to the
+ stable release?
+
+ The bug is already fixed upstream, and some users reported
+ the error.
+
+ * How does the upload fix the bug?
+ The bug is caused by a typographical error of a pre-processor
+ keyword ("#defien" instead of "#define"). The bug fix
+ includes correcting the typographical error. "Just" two
+ characters get changed.
+
+ [ Test Plan ]
+
+ * How to reproduce the bug?
+ We will reproduce this bug with the Oracle Embedded SQL
+ Pro*C Pre-processor (Oracle ESQL ProC).
+ I tested this on a fresh installation of 22.04.2 and a
+ pre-existing installation of 22.04.1.
+
+ 1. Install glibc:
+ sudo apt install libc6-dev
+
+ 2. Download the binaries Oracle ESQL ProC binaries
+ (they are licensed under the Oracle Technology Network
+ License Agreement https://www.oracle.com/downloads/licenses/standard-license.html):
+ wget https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-basic-linux.x64-21.9.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-sdk-linux.x64-21.9.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-precomp-linux.x64-21.9.0.0.0dbru.zip
+
+ 3. Create the destination where the binaries will be copied to:
+ sudo mkdir -m a=rwx /opt/oracle
+
+ 4. Unzip the binaries:
+ a.) unzip instantclient-basic-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
+ b.) unzip instantclient-sdk-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
+ c.) unzip instantclient-precomp-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
+
+ 5. Add configuration to use x86-64 arcitecture and glibc include folder location:
+ a.) echo "define=__x86_64__" >> /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
+ b.) echo "sys_include=/usr/include/x86_64-linux-gnu" >> /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
+
+ 6. Create a test source file:
+ echo "include <sys/socket.h>" | tee test.cp
+
+ 7. Add envirenment variables for the pre-processor:
+ a.) export ORACLE_HOME=/opt/oracle/instantclient_21_9
+ b.) export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_9
+
+ 8. Run the preprocessor:
+ $ORACLE_HOME/sdk/proc iname=test.pc oname=test.c sqlcheck=syntax code=ansi_c parse=partial
+
+ This will result in the following error message:
+ Pro*C/C++: Release 21.0.0.0.0 - Production on Tue Feb 28 14:58:16 2023
+ Version 21.9.0.0.0
+
+ Copyright (c) 1982, 2023, Oracle and/or its affiliates. All rights
+ reserved.
+
+ System default option values taken from:
+ /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
+
+ Syntax error at line 184, column 4, file /usr/include/x86_64-linux-gnu/sys/socket.h:
+ Error at line 184, column 4 in file /usr/include/x86_64-linux-gnu/sys/socket.h
+ # defien sendmsg __sendmsg64
+ ...1
+ PCC-S-02014, Encountered the symbol "defien" when expecting one of the following
+ :
+
+ a numeric constant, newline, define, endif, error, if, ifdef,
+ ifndef, include, include_next, line, pragma, _Pragma, undef,
+ an immediate preprocessor command, a C token
+
+ [ Where problems could occur ]
+
+ * The bugfix allows compiling glibc for systems where it
+ couldn't get compiled before. This could enable the build
+ of packages that break others, but this should not count as
+ the fault of glibc.
+
+ * A theoretical regression is limited to the sys/socket.h
+ sendmsg function because it gets redirected through the
+ "#define" macro.
+
+ * A pre-compiler of a non-GNUC compiler that tries to appear
+ as a GNUC compiler with an incorrect lexical analyzer could
+ result in a different syntax tree. I don't know of an
+ example, and Canonical should not support such a
+ configuration
+
+ [ Other Info ]
+ |
+ * Many non-GNUC compilers try to appear as a GNUC compiler by
+ using pre-defined compiler macros typical for GNUC compilers.
+ A non-GNUC compiler that tries to appear as GNUC version two
+ or higher may NOT be affected, while a non-GNUC compiler may
+ be affected.
+
+ * The original bug report description:
+
On line 184 in/usr/include/x86_64-linux-gnu/sys/socket.h it says
# defien sendmsg __sendmsg64
which obviously should read "define" instead.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: libc6-dev 2.35-0ubuntu3.1
ProcVersionSignature: Microsoft 4.4.0-22000.653-Microsoft 4.4.35
Uname: Linux 4.4.0-22000-Microsoft x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Fri Oct 7 13:06:34 2022
ProcEnviron:
- LD_LIBRARY_PATH=<set>
- TERM=xterm-256color
- PATH=(custom, no user)
- LANG=en_GB.UTF-8
- SHELL=/bin/bash
+ LD_LIBRARY_PATH=<set>
+ TERM=xterm-256color
+ PATH=(custom, no user)
+ LANG=en_GB.UTF-8
+ SHELL=/bin/bash
SourcePackage: glibc
UpgradeStatus: No upgrade log present (probably fresh install)
** Description changed:
[ Impact ]
- * What are the effects of the bug on users?
- Some Compilers will exit with a syntax error when
- a user tries to compile glibc for systems where the
- 'time_t' type of the default ABI is 32 bits (e.g. arm,
- hppa, microblaze). The compiler must be a Clang compiler
- with a major version of less than four and is either a
- GNUC compiler with a major version of less than two or no
- GNUC compiler.
-
- If someone should be confused; here is the logical notation
- (See "Other Info" before you evaluate this!):
- TIME_BITS_SIZE = 32 AND CLANG_MAJOR < 4
- AND (NOT GNUC OR GNUC < 2)
+ * What are the effects of the bug on users?
+ Some Compilers will exit with a syntax error when
+ a user tries to compile glibc for systems where the
+ 'time_t' type of the default ABI is 32 bits (e.g. arm,
+ hppa, microblaze). The compiler must be a Clang compiler
+ with a major version of less than four and is either a
+ GNUC compiler with a major version of less than two or no
+ GNUC compiler.
- Additionally, a few C pre-processors (an overwhelming
- minority) will throw a syntax error if they encounter an
- unknown pre-processor keyword, even if it is unreachable
- (like this bug).
+ If someone should be confused; here is the logical notation
+ (See "Other Info" before you evaluate this!):
+ TIME_BITS_SIZE = 32 AND CLANG_MAJOR < 4
+ AND (NOT GNUC OR GNUC < 2)
- * What is the justification for backporting the fix to the
- stable release?
+ Additionally, a few C pre-processors (an overwhelming
+ minority) will throw a syntax error if they encounter an
+ unknown pre-processor keyword, even if it is unreachable
+ (like this bug).
- The bug is already fixed upstream, and some users reported
- the error.
+ * What is the justification for backporting the fix to the
+ stable release?
- * How does the upload fix the bug?
- The bug is caused by a typographical error of a pre-processor
- keyword ("#defien" instead of "#define"). The bug fix
- includes correcting the typographical error. "Just" two
- characters get changed.
+ The bug is already fixed upstream, and some users reported
+ the error.
+
+ * How does the upload fix the bug?
+ The bug is caused by a typographical error of a pre-processor
+ keyword ("#defien" instead of "#define"). The bug fix
+ includes correcting the typographical error. "Just" two
+ characters get changed.
[ Test Plan ]
- * How to reproduce the bug?
- We will reproduce this bug with the Oracle Embedded SQL
- Pro*C Pre-processor (Oracle ESQL ProC).
- I tested this on a fresh installation of 22.04.2 and a
- pre-existing installation of 22.04.1.
+ * How to reproduce the bug?
+ We will reproduce this bug with the Oracle Embedded SQL
+ Pro*C Pre-processor (Oracle ESQL ProC).
+ I tested this on a fresh installation of 22.04.2 and a
+ pre-existing installation of 22.04.1.
- 1. Install glibc:
- sudo apt install libc6-dev
+ 1. Install glibc:
+ sudo apt install libc6-dev
- 2. Download the binaries Oracle ESQL ProC binaries
- (they are licensed under the Oracle Technology Network
- License Agreement https://www.oracle.com/downloads/licenses/standard-license.html):
- wget https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-basic-linux.x64-21.9.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-sdk-linux.x64-21.9.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-precomp-linux.x64-21.9.0.0.0dbru.zip
+ 2. Download the binaries Oracle ESQL ProC binaries
+ (they are licensed under the Oracle Technology Network
+ License Agreement https://www.oracle.com/downloads/licenses/standard-license.html):
+ wget https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-basic-linux.x64-21.9.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-sdk-linux.x64-21.9.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-precomp-linux.x64-21.9.0.0.0dbru.zip
- 3. Create the destination where the binaries will be copied to:
- sudo mkdir -m a=rwx /opt/oracle
+ 3. Create the destination where the binaries will be copied to:
+ sudo mkdir -m a=rwx /opt/oracle
- 4. Unzip the binaries:
- a.) unzip instantclient-basic-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
- b.) unzip instantclient-sdk-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
- c.) unzip instantclient-precomp-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
+ 4. Unzip the binaries:
+ a.) unzip instantclient-basic-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
+ b.) unzip instantclient-sdk-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
+ c.) unzip instantclient-precomp-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
- 5. Add configuration to use x86-64 arcitecture and glibc include folder location:
- a.) echo "define=__x86_64__" >> /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
- b.) echo "sys_include=/usr/include/x86_64-linux-gnu" >> /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
+ 5. Add configuration to use x86-64 arcitecture and glibc include folder location:
+ a.) echo "define=__x86_64__" >> /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
+ b.) echo "sys_include=/usr/include/x86_64-linux-gnu" >> /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
- 6. Create a test source file:
- echo "include <sys/socket.h>" | tee test.cp
+ 6. Create a test source file:
+ echo "include <sys/socket.h>" | tee test.cp
- 7. Add envirenment variables for the pre-processor:
- a.) export ORACLE_HOME=/opt/oracle/instantclient_21_9
- b.) export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_9
+ 7. Add envirenment variables for the pre-processor:
+ a.) export ORACLE_HOME=/opt/oracle/instantclient_21_9
+ b.) export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_9
- 8. Run the preprocessor:
- $ORACLE_HOME/sdk/proc iname=test.pc oname=test.c sqlcheck=syntax code=ansi_c parse=partial
+ 8. Run the preprocessor:
+ $ORACLE_HOME/sdk/proc iname=test.pc oname=test.c sqlcheck=syntax code=ansi_c parse=partial
- This will result in the following error message:
- Pro*C/C++: Release 21.0.0.0.0 - Production on Tue Feb 28 14:58:16 2023
- Version 21.9.0.0.0
+ This will result in the following error message:
+ Syntax error at line 184, column 4, file /usr/include/x86_64-linux-gnu/sys/socket.h:
+ Error at line 184, column 4 in file /usr/include/x86_64-linux-gnu/sys/socket.h
+ # defien sendmsg __sendmsg64
+ ...1
+ PCC-S-02014, Encountered the symbol "defien" when expecting one of the following
+ :
- Copyright (c) 1982, 2023, Oracle and/or its affiliates. All rights
- reserved.
-
- System default option values taken from:
- /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
-
- Syntax error at line 184, column 4, file /usr/include/x86_64-linux-gnu/sys/socket.h:
- Error at line 184, column 4 in file /usr/include/x86_64-linux-gnu/sys/socket.h
- # defien sendmsg __sendmsg64
- ...1
- PCC-S-02014, Encountered the symbol "defien" when expecting one of the following
- :
-
- a numeric constant, newline, define, endif, error, if, ifdef,
- ifndef, include, include_next, line, pragma, _Pragma, undef,
- an immediate preprocessor command, a C token
+ a numeric constant, newline, define, endif, error, if, ifdef,
+ ifndef, include, include_next, line, pragma, _Pragma, undef,
+ an immediate preprocessor command, a C token
[ Where problems could occur ]
- * The bugfix allows compiling glibc for systems where it
- couldn't get compiled before. This could enable the build
- of packages that break others, but this should not count as
- the fault of glibc.
+ * The bugfix allows compiling glibc for systems where it
+ couldn't get compiled before. This could enable the build
+ of packages that break others, but this should not count as
+ the fault of glibc.
- * A theoretical regression is limited to the sys/socket.h
- sendmsg function because it gets redirected through the
- "#define" macro.
+ * A theoretical regression is limited to the sys/socket.h
+ sendmsg function because it gets redirected through the
+ "#define" macro.
- * A pre-compiler of a non-GNUC compiler that tries to appear
- as a GNUC compiler with an incorrect lexical analyzer could
- result in a different syntax tree. I don't know of an
- example, and Canonical should not support such a
- configuration
+ * A pre-compiler of a non-GNUC compiler that tries to appear
+ as a GNUC compiler with an incorrect lexical analyzer could
+ result in a different syntax tree. I don't know of an
+ example, and Canonical should not support such a
+ configuration
[ Other Info ]
- |
- * Many non-GNUC compilers try to appear as a GNUC compiler by
- using pre-defined compiler macros typical for GNUC compilers.
- A non-GNUC compiler that tries to appear as GNUC version two
- or higher may NOT be affected, while a non-GNUC compiler may
- be affected.
+ |
+ * Many non-GNUC compilers try to appear as a GNUC compiler by
+ using pre-defined compiler macros typical for GNUC compilers.
+ A non-GNUC compiler that tries to appear as GNUC version two
+ or higher may NOT be affected, while a non-GNUC compiler may
+ be affected.
- * The original bug report description:
+ * The original bug report description:
On line 184 in/usr/include/x86_64-linux-gnu/sys/socket.h it says
# defien sendmsg __sendmsg64
which obviously should read "define" instead.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: libc6-dev 2.35-0ubuntu3.1
ProcVersionSignature: Microsoft 4.4.0-22000.653-Microsoft 4.4.35
Uname: Linux 4.4.0-22000-Microsoft x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Fri Oct 7 13:06:34 2022
ProcEnviron:
LD_LIBRARY_PATH=<set>
TERM=xterm-256color
PATH=(custom, no user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: glibc
UpgradeStatus: No upgrade log present (probably fresh install)
** Summary changed:
- Syntax error defien in socket.h
+ [SRU] Syntax error defien in socket.h
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1992159
Title:
[SRU] Syntax error defien in socket.h
Status in glibc package in Ubuntu:
Triaged
Bug description:
[ Impact ]
* What are the effects of the bug on users?
Some Compilers will exit with a syntax error when
a user tries to compile glibc for systems where the
'time_t' type of the default ABI is 32 bits (e.g. arm,
hppa, microblaze). The compiler must be a Clang compiler
with a major version of less than four and is either a
GNUC compiler with a major version of less than two or no
GNUC compiler.
If someone should be confused; here is the logical notation
(See "Other Info" before you evaluate this!):
TIME_BITS_SIZE = 32 AND CLANG_MAJOR < 4
AND (NOT GNUC OR GNUC < 2)
Additionally, a few C pre-processors (an overwhelming
minority) will throw a syntax error if they encounter an
unknown pre-processor keyword, even if it is unreachable
(like this bug).
* What is the justification for backporting the fix to the
stable release?
The bug is already fixed upstream, and some users reported
the error.
* How does the upload fix the bug?
The bug is caused by a typographical error of a pre-processor
keyword ("#defien" instead of "#define"). The bug fix
includes correcting the typographical error. "Just" two
characters get changed.
[ Test Plan ]
* How to reproduce the bug?
We will reproduce this bug with the Oracle Embedded SQL
Pro*C Pre-processor (Oracle ESQL ProC).
I tested this on a fresh installation of 22.04.2 and a
pre-existing installation of 22.04.1.
1. Install glibc:
sudo apt install libc6-dev
2. Download the binaries Oracle ESQL ProC binaries
(they are licensed under the Oracle Technology Network
License Agreement https://www.oracle.com/downloads/licenses/standard-license.html):
wget https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-basic-linux.x64-21.9.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-sdk-linux.x64-21.9.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/219000/instantclient-precomp-linux.x64-21.9.0.0.0dbru.zip
3. Create the destination where the binaries will be copied to:
sudo mkdir -m a=rwx /opt/oracle
4. Unzip the binaries:
a.) unzip instantclient-basic-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
b.) unzip instantclient-sdk-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
c.) unzip instantclient-precomp-linux.x64-21.9.0.0.0dbru.zip -d /opt/oracle
5. Add configuration to use x86-64 arcitecture and glibc include folder location:
a.) echo "define=__x86_64__" >> /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
b.) echo "sys_include=/usr/include/x86_64-linux-gnu" >> /opt/oracle/instantclient_21_9/precomp/admin/pcscfg.cfg
6. Create a test source file:
echo "include <sys/socket.h>" | tee test.cp
7. Add envirenment variables for the pre-processor:
a.) export ORACLE_HOME=/opt/oracle/instantclient_21_9
b.) export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_9
8. Run the preprocessor:
$ORACLE_HOME/sdk/proc iname=test.pc oname=test.c sqlcheck=syntax code=ansi_c parse=partial
This will result in the following error message:
Syntax error at line 184, column 4, file /usr/include/x86_64-linux-gnu/sys/socket.h:
Error at line 184, column 4 in file /usr/include/x86_64-linux-gnu/sys/socket.h
# defien sendmsg __sendmsg64
...1
PCC-S-02014, Encountered the symbol "defien" when expecting one of the following
:
a numeric constant, newline, define, endif, error, if, ifdef,
ifndef, include, include_next, line, pragma, _Pragma, undef,
an immediate preprocessor command, a C token
[ Where problems could occur ]
* The bugfix allows compiling glibc for systems where it
couldn't get compiled before. This could enable the build
of packages that break others, but this should not count as
the fault of glibc.
* A theoretical regression is limited to the sys/socket.h
sendmsg function because it gets redirected through the
"#define" macro.
* A pre-compiler of a non-GNUC compiler that tries to appear
as a GNUC compiler with an incorrect lexical analyzer could
result in a different syntax tree. I don't know of an
example, and Canonical should not support such a
configuration
[ Other Info ]
|
* Many non-GNUC compilers try to appear as a GNUC compiler by
using pre-defined compiler macros typical for GNUC compilers.
A non-GNUC compiler that tries to appear as GNUC version two
or higher may NOT be affected, while a non-GNUC compiler may
be affected.
* The original bug report description:
On line 184 in/usr/include/x86_64-linux-gnu/sys/socket.h it says
# defien sendmsg __sendmsg64
which obviously should read "define" instead.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: libc6-dev 2.35-0ubuntu3.1
ProcVersionSignature: Microsoft 4.4.0-22000.653-Microsoft 4.4.35
Uname: Linux 4.4.0-22000-Microsoft x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Fri Oct 7 13:06:34 2022
ProcEnviron:
LD_LIBRARY_PATH=<set>
TERM=xterm-256color
PATH=(custom, no user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: glibc
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1992159/+subscriptions
More information about the foundations-bugs
mailing list