Craig
Craig

Reputation: 3

Oracle Developer Studio in Ubuntu 14.04: Cannot find sys/cdefs.h when compiling

So I've just followed the instructions on Oracles site to install the tarfile version of Oracle Developer Studio 12.5. Testing the installation using:

https://docs.oracle.com/cd/E37069_01/html/E37072/gozue.html#scrolltoc

I find when compiling with

cc -V hello.c

I get the following error (only a fraction due to stackoverflow limit):

"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/sys/cdefs.h", line 9: cannot find include file: <sys/cdefs.h>
"/usr/include/features.h", line 388: cannot find include file: <gnu/stubs.h>
"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/stddef.h", line 39: syntax error before or at: typedef
"/usr/include/stdio.h", line 35: cannot find include file: <bits/types.h>
"/usr/include/stdio.h", line 48: syntax error before or at: typedef
"/usr/include/stdio.h", line 53: syntax error before or at: __USING_NAMESPACE_STD
"/usr/include/_G_config.h", line 9: cannot find include file: <bits/types.h>
"/usr/include/_G_config.h", line 23: syntax error before or at: __off_t
"/usr/include/_G_config.h", line 28: syntax error before or at: __off64_t
"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/va_impl.h", line 168: parameter not in identifier list: __builtin_va_start
"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/va_impl.h", line 170: parameter not in identifier list: __builtin_va_arg_incr
"/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/lib/compilers/include/cc/sys/cdefs.h", line 9: cannot find include file: <sys/cdefs.h>
"/usr/include/libio.h", line 154: void parameter cannot have name: _IO_lock_t
"/usr/include/libio.h", line 274: syntax error before or at: __off_t
"/usr/include/libio.h", line 293: syntax error before or at: __off64_t
"/usr/include/libio.h", line 320: only "register" valid as formal parameter storage class
"/usr/include/libio.h", line 320: parameter not in identifier list: _IO_2_1_stdin_
"/usr/include/libio.h", line 320: incomplete struct/union/enum _IO_FILE_plus: _IO_2_1_stdin_
"/usr/include/libio.h", line 321: only "register" valid as formal parameter storage class
"/usr/include/libio.h", line 321: parameter not in identifier list: _IO_2_1_stdout_
"/usr/include/libio.h", line 322: only "register" valid as formal parameter storage class
"/usr/include/libio.h", line 322: parameter not in identifier list: _IO_2_1_stderr_
"/usr/include/libio.h", line 338: syntax error before or at: __io_read_fn
"/usr/include/libio.h", line 338: parameter not in identifier list: __io_read_fn
"/usr/include/libio.h", line 346: syntax error before or at: __io_write_fn
"/usr/include/libio.h", line 346: parameter not in identifier list: __io_write_fn
"/usr/include/libio.h", line 355: syntax error before or at: __off64_t
"/usr/include/libio.h", line 390: only "register" valid as formal parameter storage class
"/usr/include/libio.h", line 390: syntax error before or at: *

Specifically the first part where it says cannot find . Now the file is present in the directory stated so I don't know what's causing it. Note, however the code compiles fine when using the default PATH of

/usr/local/bin

it's only when I set the the PATH to

/home/craig/Programs/OracleDeveloperStudio12.5-linux-x86-bin/developerstudio12.5/bin

as it requests on the site to test installation, that it brings up these errors. The same is also true when compiling any of the project samples in solstudio. I think I have to update or install some extra packages, but I'm not sure which ones if so or frankly what's going on here. The site seems to only offer updates or patches for Oracle Solaris, not Ubuntu or Linux so don't know what to do. Apologies if this is simple. Not an advanced Linux user and first time using Oracle Developer Studio. As the title says I'm running under Ubuntu 14.04 and from what I can gather from documentation, it should be compatible with Ubuntu OS.

Upvotes: 0

Views: 530

Answers (1)

Knud Larsen
Knud Larsen

Reputation: 5899

cannot find include file: <sys/cdefs.h> 
cannot find include file:<gnu/stubs.h>
cannot find include file: <bits/types.h>

Please do : sudo apt update && sudo apt install g++

... which is also installing the files which make gcc work fully : libc6-dev, linux-libc-dev .

Upvotes: 1

Related Questions